You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

596 lines
33 KiB

  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class UnityMainThreadTaskScheduler
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class UnityMainThreadTaskScheduler
  11. ">
  12. <meta name="generator" content="docfx 2.59.3.0">
  13. <link rel="shortcut icon" href="../favicon.ico">
  14. <link rel="stylesheet" href="../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../styles/docfx.css">
  16. <link rel="stylesheet" href="../styles/main.css">
  17. <link rel="stylesheet" href="../styles/fix.css">
  18. <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
  19. <meta property="docfx:navrel" content="../toc.html">
  20. <meta property="docfx:tocrel" content="toc.html">
  21. <meta property="docfx:rel" content="../">
  22. <meta property="docfx:newtab" content="true">
  23. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  24. <div id="wrapper">
  25. <header>
  26. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  27. <div class="container">
  28. <div class="navbar-header">
  29. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  30. <span class="sr-only">Toggle navigation</span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. <span class="icon-bar"></span>
  34. </button>
  35. <a class="navbar-brand" href="../index.html">
  36. <img id="logo" class="svg" src="../logo.svg" alt="">
  37. </a>
  38. </div>
  39. <div class="collapse navbar-collapse" id="navbar">
  40. <form class="navbar-form navbar-right" role="search" id="search">
  41. <div class="form-group">
  42. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  43. </div>
  44. </form>
  45. </div>
  46. </div>
  47. </nav>
  48. <div class="subnav navbar navbar-default">
  49. <div class="container hide-when-search" id="breadcrumb">
  50. <ul class="breadcrumb">
  51. <li></li>
  52. </ul>
  53. </div>
  54. </div>
  55. </header>
  56. <div class="container body-content">
  57. <div id="search-results">
  58. <div class="search-list">Search Results for <span></span></div>
  59. <div class="sr-items">
  60. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  61. </div>
  62. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  63. </div>
  64. </div>
  65. <div role="main" class="container body-content hide-when-search">
  66. <div class="sidenav hide-when-search">
  67. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  68. <div class="sidetoggle collapse" id="sidetoggle">
  69. <div id="sidetoc"></div>
  70. </div>
  71. </div>
  72. <div class="article row grid-right">
  73. <div class="col-md-10">
  74. <article class="content wrap" id="_content" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler">
  75. <h1 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler" class="text-break">Class UnityMainThreadTaskScheduler
  76. </h1>
  77. <div class="markdown level0 summary"><p>A task scheduler that runs tasks on the Unity main thread via coroutines.</p>
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <div class="inheritance">
  81. <h5>Inheritance</h5>
  82. <div class="level0"><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></div>
  83. <div class="level1"><span class="xref">UnityMainThreadTaskScheduler</span></div>
  84. </div>
  85. <div class="implements">
  86. <h5>Implements</h5>
  87. <div><span class="xref">IDisposable</span></div>
  88. </div>
  89. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Utilities.Async.html">IPA.Utilities.Async</a></h6>
  90. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  91. <h5 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_syntax">Syntax</h5>
  92. <div class="codewrapper">
  93. <pre><code class="lang-csharp hljs">public class UnityMainThreadTaskScheduler : TaskScheduler</code></pre>
  94. </div>
  95. <h3 id="properties">Properties
  96. </h3>
  97. <span class="small pull-right mobile-hide">
  98. <span class="divider">|</span>
  99. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_Cancelling.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.Cancelling%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  100. </span>
  101. <span class="small pull-right mobile-hide">
  102. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L68">View Source</a>
  103. </span>
  104. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Cancelling_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Cancelling*"></a>
  105. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Cancelling" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Cancelling">Cancelling</h4>
  106. <div class="markdown level1 summary"><p>Gets whether or not this scheduler is in the process of shutting down.</p>
  107. </div>
  108. <div class="markdown level1 conceptual"></div>
  109. <h5 class="decalaration">Declaration</h5>
  110. <div class="codewrapper">
  111. <pre><code class="lang-csharp hljs">public bool Cancelling { get; }</code></pre>
  112. </div>
  113. <h5 class="propertyValue">Property Value</h5>
  114. <table class="table table-bordered table-striped table-condensed">
  115. <thead>
  116. <tr>
  117. <th>Type</th>
  118. <th>Description</th>
  119. </tr>
  120. </thead>
  121. <tbody>
  122. <tr>
  123. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  124. <td><p><span class="xref">true</span> if the scheduler is shutting down, <span class="xref">false</span> otherwise</p>
  125. </td>
  126. </tr>
  127. </tbody>
  128. </table>
  129. <span class="small pull-right mobile-hide">
  130. <span class="divider">|</span>
  131. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_Default.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.Default%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  132. </span>
  133. <span class="small pull-right mobile-hide">
  134. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L23">View Source</a>
  135. </span>
  136. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Default_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Default*"></a>
  137. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Default" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Default">Default</h4>
  138. <div class="markdown level1 summary"><p>Gets the default main thread scheduler that is managed by BSIPA.</p>
  139. </div>
  140. <div class="markdown level1 conceptual"></div>
  141. <h5 class="decalaration">Declaration</h5>
  142. <div class="codewrapper">
  143. <pre><code class="lang-csharp hljs">public static TaskScheduler Default { get; }</code></pre>
  144. </div>
  145. <h5 class="propertyValue">Property Value</h5>
  146. <table class="table table-bordered table-striped table-condensed">
  147. <thead>
  148. <tr>
  149. <th>Type</th>
  150. <th>Description</th>
  151. </tr>
  152. </thead>
  153. <tbody>
  154. <tr>
  155. <td><span class="xref">TaskScheduler</span></td>
  156. <td><p>a scheduler that is managed by BSIPA</p>
  157. </td>
  158. </tr>
  159. </tbody>
  160. </table>
  161. <span class="small pull-right mobile-hide">
  162. <span class="divider">|</span>
  163. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_Factory.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.Factory%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  164. </span>
  165. <span class="small pull-right mobile-hide">
  166. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L28">View Source</a>
  167. </span>
  168. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Factory_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Factory*"></a>
  169. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Factory" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Factory">Factory</h4>
  170. <div class="markdown level1 summary"><p>Gets a factory for creating tasks on <a class="xref" href="IPA.Utilities.Async.UnityMainThreadTaskScheduler.html#IPA_Utilities_Async_UnityMainThreadTaskScheduler_Default">Default</a>.</p>
  171. </div>
  172. <div class="markdown level1 conceptual"></div>
  173. <h5 class="decalaration">Declaration</h5>
  174. <div class="codewrapper">
  175. <pre><code class="lang-csharp hljs">public static TaskFactory Factory { get; }</code></pre>
  176. </div>
  177. <h5 class="propertyValue">Property Value</h5>
  178. <table class="table table-bordered table-striped table-condensed">
  179. <thead>
  180. <tr>
  181. <th>Type</th>
  182. <th>Description</th>
  183. </tr>
  184. </thead>
  185. <tbody>
  186. <tr>
  187. <td><span class="xref">TaskFactory</span></td>
  188. <td><p>a factory for creating tasks on the default scheduler</p>
  189. </td>
  190. </tr>
  191. </tbody>
  192. </table>
  193. <span class="small pull-right mobile-hide">
  194. <span class="divider">|</span>
  195. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_IsRunning.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.IsRunning%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  196. </span>
  197. <span class="small pull-right mobile-hide">
  198. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L62">View Source</a>
  199. </span>
  200. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_IsRunning_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.IsRunning*"></a>
  201. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_IsRunning" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.IsRunning">IsRunning</h4>
  202. <div class="markdown level1 summary"><p>Gets whether or not this scheduler is currently executing tasks.</p>
  203. </div>
  204. <div class="markdown level1 conceptual"></div>
  205. <h5 class="decalaration">Declaration</h5>
  206. <div class="codewrapper">
  207. <pre><code class="lang-csharp hljs">public bool IsRunning { get; }</code></pre>
  208. </div>
  209. <h5 class="propertyValue">Property Value</h5>
  210. <table class="table table-bordered table-striped table-condensed">
  211. <thead>
  212. <tr>
  213. <th>Type</th>
  214. <th>Description</th>
  215. </tr>
  216. </thead>
  217. <tbody>
  218. <tr>
  219. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  220. <td><p><span class="xref">true</span> if the scheduler is running, <span class="xref">false</span> otherwise</p>
  221. </td>
  222. </tr>
  223. </tbody>
  224. </table>
  225. <span class="small pull-right mobile-hide">
  226. <span class="divider">|</span>
  227. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_YieldAfterTasks.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.YieldAfterTasks%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  228. </span>
  229. <span class="small pull-right mobile-hide">
  230. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L75">View Source</a>
  231. </span>
  232. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_YieldAfterTasks_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.YieldAfterTasks*"></a>
  233. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_YieldAfterTasks" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.YieldAfterTasks">YieldAfterTasks</h4>
  234. <div class="markdown level1 summary"><p>Gets or sets the number of tasks to execute before yielding back to Unity.</p>
  235. </div>
  236. <div class="markdown level1 conceptual"></div>
  237. <h5 class="decalaration">Declaration</h5>
  238. <div class="codewrapper">
  239. <pre><code class="lang-csharp hljs">public int YieldAfterTasks { get; set; }</code></pre>
  240. </div>
  241. <h5 class="propertyValue">Property Value</h5>
  242. <table class="table table-bordered table-striped table-condensed">
  243. <thead>
  244. <tr>
  245. <th>Type</th>
  246. <th>Description</th>
  247. </tr>
  248. </thead>
  249. <tbody>
  250. <tr>
  251. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
  252. <td><p>the number of tasks to execute per resume</p>
  253. </td>
  254. </tr>
  255. </tbody>
  256. </table>
  257. <span class="small pull-right mobile-hide">
  258. <span class="divider">|</span>
  259. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_YieldAfterTime.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.YieldAfterTime%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  260. </span>
  261. <span class="small pull-right mobile-hide">
  262. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L92">View Source</a>
  263. </span>
  264. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_YieldAfterTime_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.YieldAfterTime*"></a>
  265. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_YieldAfterTime" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.YieldAfterTime">YieldAfterTime</h4>
  266. <div class="markdown level1 summary"><p>Gets or sets the amount of time to execute tasks for before yielding back to Unity. Default is 0.5ms.</p>
  267. </div>
  268. <div class="markdown level1 conceptual"></div>
  269. <h5 class="decalaration">Declaration</h5>
  270. <div class="codewrapper">
  271. <pre><code class="lang-csharp hljs">public TimeSpan YieldAfterTime { get; set; }</code></pre>
  272. </div>
  273. <h5 class="propertyValue">Property Value</h5>
  274. <table class="table table-bordered table-striped table-condensed">
  275. <thead>
  276. <tr>
  277. <th>Type</th>
  278. <th>Description</th>
  279. </tr>
  280. </thead>
  281. <tbody>
  282. <tr>
  283. <td><span class="xref">TimeSpan</span></td>
  284. <td><p>the amount of time to execute tasks for before yielding back to Unity</p>
  285. </td>
  286. </tr>
  287. </tbody>
  288. </table>
  289. <h3 id="methods">Methods
  290. </h3>
  291. <span class="small pull-right mobile-hide">
  292. <span class="divider">|</span>
  293. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_Cancel.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.Cancel%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  294. </span>
  295. <span class="small pull-right mobile-hide">
  296. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L170">View Source</a>
  297. </span>
  298. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Cancel_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Cancel*"></a>
  299. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Cancel" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Cancel">Cancel()</h4>
  300. <div class="markdown level1 summary"><p>Cancels the scheduler. If the scheduler is currently executing tasks, that batch will finish first.
  301. All remaining tasks will be left in the queue.</p>
  302. </div>
  303. <div class="markdown level1 conceptual"></div>
  304. <h5 class="decalaration">Declaration</h5>
  305. <div class="codewrapper">
  306. <pre><code class="lang-csharp hljs">public void Cancel()</code></pre>
  307. </div>
  308. <span class="small pull-right mobile-hide">
  309. <span class="divider">|</span>
  310. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_Coroutine.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.Coroutine%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  311. </span>
  312. <span class="small pull-right mobile-hide">
  313. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L121">View Source</a>
  314. </span>
  315. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Coroutine_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Coroutine*"></a>
  316. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Coroutine" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Coroutine">Coroutine()</h4>
  317. <div class="markdown level1 summary"><p>When used as a Unity coroutine, runs the scheduler. Otherwise, this is an invalid call.</p>
  318. </div>
  319. <div class="markdown level1 conceptual"></div>
  320. <h5 class="decalaration">Declaration</h5>
  321. <div class="codewrapper">
  322. <pre><code class="lang-csharp hljs">public IEnumerator Coroutine()</code></pre>
  323. </div>
  324. <h5 class="returns">Returns</h5>
  325. <table class="table table-bordered table-striped table-condensed">
  326. <thead>
  327. <tr>
  328. <th>Type</th>
  329. <th>Description</th>
  330. </tr>
  331. </thead>
  332. <tbody>
  333. <tr>
  334. <td><span class="xref">IEnumerator</span></td>
  335. <td><p>a Unity coroutine</p>
  336. </td>
  337. </tr>
  338. </tbody>
  339. </table>
  340. <h5 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Coroutine_remarks">Remarks</h5>
  341. <div class="markdown level1 remarks"><p>
  342. Do not ever call <see cref="!:UnityEngine.MonoBehaviour.StopCoroutine(IEnumerator)"></see> on this
  343. coroutine, nor <see cref="!:UnityEngine.MonoBehaviour.StopAllCoroutines"></see> on the behaviour hosting
  344. this coroutine. This has no way to detect this, and this object will become invalid.
  345. </p>
  346. <p>
  347. If you need to stop this coroutine, first call <a class="xref" href="IPA.Utilities.Async.UnityMainThreadTaskScheduler.html#IPA_Utilities_Async_UnityMainThreadTaskScheduler_Cancel">Cancel()</a>, then wait for it to
  348. exit on its own.
  349. </p>
  350. </div>
  351. <span class="small pull-right mobile-hide">
  352. <span class="divider">|</span>
  353. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_Dispose.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.Dispose%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  354. </span>
  355. <span class="small pull-right mobile-hide">
  356. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L257">View Source</a>
  357. </span>
  358. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Dispose_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Dispose*"></a>
  359. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Dispose" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Dispose">Dispose()</h4>
  360. <div class="markdown level1 summary"><p>Disposes this object. This puts the object into an unusable state.</p>
  361. </div>
  362. <div class="markdown level1 conceptual"></div>
  363. <h5 class="decalaration">Declaration</h5>
  364. <div class="codewrapper">
  365. <pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
  366. </div>
  367. <span class="small pull-right mobile-hide">
  368. <span class="divider">|</span>
  369. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_Dispose_System_Boolean_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.Dispose(System.Boolean)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  370. </span>
  371. <span class="small pull-right mobile-hide">
  372. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L240">View Source</a>
  373. </span>
  374. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Dispose_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Dispose*"></a>
  375. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_Dispose_System_Boolean_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.Dispose(System.Boolean)">Dispose(Boolean)</h4>
  376. <div class="markdown level1 summary"><p>Disposes this object.</p>
  377. </div>
  378. <div class="markdown level1 conceptual"></div>
  379. <h5 class="decalaration">Declaration</h5>
  380. <div class="codewrapper">
  381. <pre><code class="lang-csharp hljs">protected virtual void Dispose(bool disposing)</code></pre>
  382. </div>
  383. <h5 class="parameters">Parameters</h5>
  384. <table class="table table-bordered table-striped table-condensed">
  385. <thead>
  386. <tr>
  387. <th>Type</th>
  388. <th>Name</th>
  389. <th>Description</th>
  390. </tr>
  391. </thead>
  392. <tbody>
  393. <tr>
  394. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  395. <td><span class="parametername">disposing</span></td>
  396. <td><p>whether or not to dispose managed objects</p>
  397. </td>
  398. </tr>
  399. </tbody>
  400. </table>
  401. <span class="small pull-right mobile-hide">
  402. <span class="divider">|</span>
  403. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_GetScheduledTasks.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.GetScheduledTasks%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  404. </span>
  405. <span class="small pull-right mobile-hide">
  406. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L183">View Source</a>
  407. </span>
  408. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_GetScheduledTasks_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.GetScheduledTasks*"></a>
  409. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_GetScheduledTasks" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.GetScheduledTasks">GetScheduledTasks()</h4>
  410. <div class="markdown level1 summary"><p>Throws a <see cref="!:NotSupportedException"></see>.</p>
  411. </div>
  412. <div class="markdown level1 conceptual"></div>
  413. <h5 class="decalaration">Declaration</h5>
  414. <div class="codewrapper">
  415. <pre><code class="lang-csharp hljs">protected override IEnumerable&lt;Task&gt; GetScheduledTasks()</code></pre>
  416. </div>
  417. <h5 class="returns">Returns</h5>
  418. <table class="table table-bordered table-striped table-condensed">
  419. <thead>
  420. <tr>
  421. <th>Type</th>
  422. <th>Description</th>
  423. </tr>
  424. </thead>
  425. <tbody>
  426. <tr>
  427. <td><span class="xref">IEnumerable</span>&lt;<span class="xref">Task</span>&gt;</td>
  428. <td><p>nothing</p>
  429. </td>
  430. </tr>
  431. </tbody>
  432. </table>
  433. <span class="small pull-right mobile-hide">
  434. <span class="divider">|</span>
  435. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_QueueTask_Task_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.QueueTask(Task)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  436. </span>
  437. <span class="small pull-right mobile-hide">
  438. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L192">View Source</a>
  439. </span>
  440. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_QueueTask_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.QueueTask*"></a>
  441. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_QueueTask_Task_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.QueueTask(Task)">QueueTask(Task)</h4>
  442. <div class="markdown level1 summary"><p>Queues a given <see cref="!:Task"></see> to this scheduler. The <see cref="!:Task"></see> <em>must</em> be
  443. scheduled for this <see cref="!:TaskScheduler"></see> by the runtime.</p>
  444. </div>
  445. <div class="markdown level1 conceptual"></div>
  446. <h5 class="decalaration">Declaration</h5>
  447. <div class="codewrapper">
  448. <pre><code class="lang-csharp hljs">protected override void QueueTask(Task task)</code></pre>
  449. </div>
  450. <h5 class="parameters">Parameters</h5>
  451. <table class="table table-bordered table-striped table-condensed">
  452. <thead>
  453. <tr>
  454. <th>Type</th>
  455. <th>Name</th>
  456. <th>Description</th>
  457. </tr>
  458. </thead>
  459. <tbody>
  460. <tr>
  461. <td><span class="xref">Task</span></td>
  462. <td><span class="parametername">task</span></td>
  463. <td><p>the <see cref="!:Task"></see> to queue</p>
  464. </td>
  465. </tr>
  466. </tbody>
  467. </table>
  468. <span class="small pull-right mobile-hide">
  469. <span class="divider">|</span>
  470. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler_TryExecuteTaskInline_Task_System_Boolean_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler.TryExecuteTaskInline(Task%2CSystem.Boolean)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  471. </span>
  472. <span class="small pull-right mobile-hide">
  473. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L208">View Source</a>
  474. </span>
  475. <a id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_TryExecuteTaskInline_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.TryExecuteTaskInline*"></a>
  476. <h4 id="IPA_Utilities_Async_UnityMainThreadTaskScheduler_TryExecuteTaskInline_Task_System_Boolean_" data-uid="IPA.Utilities.Async.UnityMainThreadTaskScheduler.TryExecuteTaskInline(Task,System.Boolean)">TryExecuteTaskInline(Task, Boolean)</h4>
  477. <div class="markdown level1 summary"><p>Runs the task inline if the current thread is the Unity main thread.</p>
  478. </div>
  479. <div class="markdown level1 conceptual"></div>
  480. <h5 class="decalaration">Declaration</h5>
  481. <div class="codewrapper">
  482. <pre><code class="lang-csharp hljs">protected override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued)</code></pre>
  483. </div>
  484. <h5 class="parameters">Parameters</h5>
  485. <table class="table table-bordered table-striped table-condensed">
  486. <thead>
  487. <tr>
  488. <th>Type</th>
  489. <th>Name</th>
  490. <th>Description</th>
  491. </tr>
  492. </thead>
  493. <tbody>
  494. <tr>
  495. <td><span class="xref">Task</span></td>
  496. <td><span class="parametername">task</span></td>
  497. <td><p>the task to attempt to execute</p>
  498. </td>
  499. </tr>
  500. <tr>
  501. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  502. <td><span class="parametername">taskWasPreviouslyQueued</span></td>
  503. <td><p>whether the task was previously queued to this scheduler</p>
  504. </td>
  505. </tr>
  506. </tbody>
  507. </table>
  508. <h5 class="returns">Returns</h5>
  509. <table class="table table-bordered table-striped table-condensed">
  510. <thead>
  511. <tr>
  512. <th>Type</th>
  513. <th>Description</th>
  514. </tr>
  515. </thead>
  516. <tbody>
  517. <tr>
  518. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  519. <td><p><span class="xref">false</span> if the task could not be run, <span class="xref">true</span> if it was</p>
  520. </td>
  521. </tr>
  522. </tbody>
  523. </table>
  524. <h3 id="implements">Implements</h3>
  525. <div>
  526. <span class="xref">IDisposable</span>
  527. </div>
  528. <h3 id="extensionmethods">Extension Methods</h3>
  529. <div>
  530. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetField__2___0_System_String___1_">ReflectionUtil.SetField&lt;T, U&gt;(T, String, U)</a>
  531. </div>
  532. <div>
  533. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_GetField__2___1_System_String_">ReflectionUtil.GetField&lt;U, T&gt;(T, String)</a>
  534. </div>
  535. <div>
  536. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetProperty__2___0_System_String___1_">ReflectionUtil.SetProperty&lt;T, U&gt;(T, String, U)</a>
  537. </div>
  538. <div>
  539. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_GetProperty__2___1_System_String_">ReflectionUtil.GetProperty&lt;U, T&gt;(T, String)</a>
  540. </div>
  541. <div>
  542. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokeMethod__2___1_System_String_System_Object___">ReflectionUtil.InvokeMethod&lt;U, T&gt;(T, String, Object[])</a>
  543. </div>
  544. </article>
  545. </div>
  546. <div class="hidden-sm col-md-2" role="complementary">
  547. <div class="sideaffix">
  548. <div class="contribution">
  549. <ul class="nav">
  550. <li>
  551. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_UnityMainThreadTaskScheduler.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.UnityMainThreadTaskScheduler%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
  552. </li>
  553. <li>
  554. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Async/UnityMainThreadTaskScheduler.cs/#L17" class="contribution-link">View Source</a>
  555. </li>
  556. </ul>
  557. </div>
  558. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  559. <h5>In This Article</h5>
  560. <div></div>
  561. </nav>
  562. </div>
  563. </div>
  564. </div>
  565. </div>
  566. <footer>
  567. <div class="grad-bottom"></div>
  568. <div class="footer">
  569. <div class="container">
  570. <span class="pull-right">
  571. <a href="#top">Back to top</a>
  572. </span>
  573. <span>Generated by <strong>DocFX</strong></span>
  574. </div>
  575. </div>
  576. </footer>
  577. </div>
  578. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  579. <script type="text/javascript" src="../styles/docfx.js"></script>
  580. <script type="text/javascript" src="../styles/main.js"></script>
  581. </body>
  582. </html>