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.

615 lines
33 KiB

10 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  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 SingleThreadTaskScheduler
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class SingleThreadTaskScheduler
  11. ">
  12. <meta name="generator" content="docfx 2.59.4.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.SingleThreadTaskScheduler">
  75. <h1 id="IPA_Utilities_Async_SingleThreadTaskScheduler" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler" class="text-break">Class SingleThreadTaskScheduler
  76. </h1>
  77. <div class="markdown level0 summary"><p>A single-threaded task scheduler that runs all of its tasks on the same thread.</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://learn.microsoft.com/dotnet/api/system.object">Object</a></div>
  83. <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler">TaskScheduler</a></div>
  84. <div class="level2"><span class="xref">SingleThreadTaskScheduler</span></div>
  85. </div>
  86. <div class="implements">
  87. <h5>Implements</h5>
  88. <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  89. </div>
  90. <div class="inheritedMembers">
  91. <h5>Inherited Members</h5>
  92. <div>
  93. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler.trydequeue#system-threading-tasks-taskscheduler-trydequeue(system-threading-tasks-task)">TaskScheduler.TryDequeue(Task)</a>
  94. </div>
  95. <div>
  96. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler.fromcurrentsynchronizationcontext#system-threading-tasks-taskscheduler-fromcurrentsynchronizationcontext">TaskScheduler.FromCurrentSynchronizationContext()</a>
  97. </div>
  98. <div>
  99. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler.tryexecutetask#system-threading-tasks-taskscheduler-tryexecutetask(system-threading-tasks-task)">TaskScheduler.TryExecuteTask(Task)</a>
  100. </div>
  101. <div>
  102. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler.maximumconcurrencylevel#system-threading-tasks-taskscheduler-maximumconcurrencylevel">TaskScheduler.MaximumConcurrencyLevel</a>
  103. </div>
  104. <div>
  105. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler.default#system-threading-tasks-taskscheduler-default">TaskScheduler.Default</a>
  106. </div>
  107. <div>
  108. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler.current#system-threading-tasks-taskscheduler-current">TaskScheduler.Current</a>
  109. </div>
  110. <div>
  111. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler.id#system-threading-tasks-taskscheduler-id">TaskScheduler.Id</a>
  112. </div>
  113. <div>
  114. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler.unobservedtaskexception#system-threading-tasks-taskscheduler-unobservedtaskexception">TaskScheduler.UnobservedTaskException</a>
  115. </div>
  116. <div>
  117. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring#system-object-tostring">Object.ToString()</a>
  118. </div>
  119. <div>
  120. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">Object.Equals(Object)</a>
  121. </div>
  122. <div>
  123. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">Object.Equals(Object, Object)</a>
  124. </div>
  125. <div>
  126. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals#system-object-referenceequals(system-object-system-object)">Object.ReferenceEquals(Object, Object)</a>
  127. </div>
  128. <div>
  129. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode#system-object-gethashcode">Object.GetHashCode()</a>
  130. </div>
  131. <div>
  132. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype#system-object-gettype">Object.GetType()</a>
  133. </div>
  134. <div>
  135. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone#system-object-memberwiseclone">Object.MemberwiseClone()</a>
  136. </div>
  137. </div>
  138. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Utilities.Async.html">IPA.Utilities.Async</a></h6>
  139. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  140. <h5 id="IPA_Utilities_Async_SingleThreadTaskScheduler_syntax">Syntax</h5>
  141. <div class="codewrapper">
  142. <pre><code class="lang-csharp hljs">public class SingleThreadTaskScheduler : TaskScheduler, IDisposable</code></pre>
  143. </div>
  144. <h3 id="properties">Properties
  145. </h3>
  146. <span class="small pull-right mobile-hide">
  147. <span class="divider">|</span>
  148. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_SingleThreadTaskScheduler_IsRunning.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.SingleThreadTaskScheduler.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>
  149. </span>
  150. <span class="small pull-right mobile-hide">
  151. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/80222a6da147bae9b95433ef78d03c5dd581e465/IPA.Loader/Utilities/Async/SingleThreadTaskScheduler.cs/#L24">View Source</a>
  152. </span>
  153. <a id="IPA_Utilities_Async_SingleThreadTaskScheduler_IsRunning_" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.IsRunning*"></a>
  154. <h4 id="IPA_Utilities_Async_SingleThreadTaskScheduler_IsRunning" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.IsRunning">IsRunning</h4>
  155. <div class="markdown level1 summary"><p>Gets whether or not the underlying thread has been started.</p>
  156. </div>
  157. <div class="markdown level1 conceptual"></div>
  158. <h5 class="decalaration">Declaration</h5>
  159. <div class="codewrapper">
  160. <pre><code class="lang-csharp hljs">public bool IsRunning { get; }</code></pre>
  161. </div>
  162. <h5 class="propertyValue">Property Value</h5>
  163. <table class="table table-bordered table-striped table-condensed">
  164. <thead>
  165. <tr>
  166. <th>Type</th>
  167. <th>Description</th>
  168. </tr>
  169. </thead>
  170. <tbody>
  171. <tr>
  172. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  173. <td></td>
  174. </tr>
  175. </tbody>
  176. </table>
  177. <h5 class="exceptions">Exceptions</h5>
  178. <table class="table table-bordered table-striped table-condensed">
  179. <thead>
  180. <tr>
  181. <th>Type</th>
  182. <th>Condition</th>
  183. </tr>
  184. </thead>
  185. <tbody>
  186. <tr>
  187. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  188. <td><p>Thrown if this object has already been disposed.</p>
  189. </td>
  190. </tr>
  191. </tbody>
  192. </table>
  193. <h3 id="methods">Methods
  194. </h3>
  195. <span class="small pull-right mobile-hide">
  196. <span class="divider">|</span>
  197. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_SingleThreadTaskScheduler_Dispose.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.SingleThreadTaskScheduler.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>
  198. </span>
  199. <span class="small pull-right mobile-hide">
  200. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/80222a6da147bae9b95433ef78d03c5dd581e465/IPA.Loader/Utilities/Async/SingleThreadTaskScheduler.cs/#L179">View Source</a>
  201. </span>
  202. <a id="IPA_Utilities_Async_SingleThreadTaskScheduler_Dispose_" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.Dispose*"></a>
  203. <h4 id="IPA_Utilities_Async_SingleThreadTaskScheduler_Dispose" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.Dispose">Dispose()</h4>
  204. <div class="markdown level1 summary"><p>Disposes this object. This puts the object into an unusable state.</p>
  205. </div>
  206. <div class="markdown level1 conceptual"></div>
  207. <h5 class="decalaration">Declaration</h5>
  208. <div class="codewrapper">
  209. <pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
  210. </div>
  211. <span class="small pull-right mobile-hide">
  212. <span class="divider">|</span>
  213. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_SingleThreadTaskScheduler_Dispose_System_Boolean_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.SingleThreadTaskScheduler.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>
  214. </span>
  215. <span class="small pull-right mobile-hide">
  216. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/80222a6da147bae9b95433ef78d03c5dd581e465/IPA.Loader/Utilities/Async/SingleThreadTaskScheduler.cs/#L162">View Source</a>
  217. </span>
  218. <a id="IPA_Utilities_Async_SingleThreadTaskScheduler_Dispose_" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.Dispose*"></a>
  219. <h4 id="IPA_Utilities_Async_SingleThreadTaskScheduler_Dispose_System_Boolean_" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.Dispose(System.Boolean)">Dispose(Boolean)</h4>
  220. <div class="markdown level1 summary"><p>Disposes this object.</p>
  221. </div>
  222. <div class="markdown level1 conceptual"></div>
  223. <h5 class="decalaration">Declaration</h5>
  224. <div class="codewrapper">
  225. <pre><code class="lang-csharp hljs">protected virtual void Dispose(bool disposing)</code></pre>
  226. </div>
  227. <h5 class="parameters">Parameters</h5>
  228. <table class="table table-bordered table-striped table-condensed">
  229. <thead>
  230. <tr>
  231. <th>Type</th>
  232. <th>Name</th>
  233. <th>Description</th>
  234. </tr>
  235. </thead>
  236. <tbody>
  237. <tr>
  238. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  239. <td><span class="parametername">disposing</span></td>
  240. <td><p>whether or not to dispose managed objects</p>
  241. </td>
  242. </tr>
  243. </tbody>
  244. </table>
  245. <span class="small pull-right mobile-hide">
  246. <span class="divider">|</span>
  247. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_SingleThreadTaskScheduler_Exit.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.SingleThreadTaskScheduler.Exit%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>
  248. </span>
  249. <span class="small pull-right mobile-hide">
  250. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/80222a6da147bae9b95433ef78d03c5dd581e465/IPA.Loader/Utilities/Async/SingleThreadTaskScheduler.cs/#L52">View Source</a>
  251. </span>
  252. <a id="IPA_Utilities_Async_SingleThreadTaskScheduler_Exit_" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.Exit*"></a>
  253. <h4 id="IPA_Utilities_Async_SingleThreadTaskScheduler_Exit" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.Exit">Exit()</h4>
  254. <div class="markdown level1 summary"><p>Terminates the runner thread, and waits for the currently running task to complete.</p>
  255. </div>
  256. <div class="markdown level1 conceptual"></div>
  257. <h5 class="decalaration">Declaration</h5>
  258. <div class="codewrapper">
  259. <pre><code class="lang-csharp hljs">public IEnumerable&lt;Task&gt; Exit()</code></pre>
  260. </div>
  261. <h5 class="returns">Returns</h5>
  262. <table class="table table-bordered table-striped table-condensed">
  263. <thead>
  264. <tr>
  265. <th>Type</th>
  266. <th>Description</th>
  267. </tr>
  268. </thead>
  269. <tbody>
  270. <tr>
  271. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a>&gt;</td>
  272. <td><p>an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable&lt;T&gt;</a> of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a>s that did not execute</p>
  273. </td>
  274. </tr>
  275. </tbody>
  276. </table>
  277. <h5 id="IPA_Utilities_Async_SingleThreadTaskScheduler_Exit_remarks">Remarks</h5>
  278. <div class="markdown level1 remarks"><p>After this method returns, this object has been disposed and is no longer in a valid state.</p>
  279. </div>
  280. <h5 class="exceptions">Exceptions</h5>
  281. <table class="table table-bordered table-striped table-condensed">
  282. <thead>
  283. <tr>
  284. <th>Type</th>
  285. <th>Condition</th>
  286. </tr>
  287. </thead>
  288. <tbody>
  289. <tr>
  290. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  291. <td><p>Thrown if this object has already been disposed.</p>
  292. </td>
  293. </tr>
  294. </tbody>
  295. </table>
  296. <span class="small pull-right mobile-hide">
  297. <span class="divider">|</span>
  298. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_SingleThreadTaskScheduler_GetScheduledTasks.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.SingleThreadTaskScheduler.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>
  299. </span>
  300. <span class="small pull-right mobile-hide">
  301. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/80222a6da147bae9b95433ef78d03c5dd581e465/IPA.Loader/Utilities/Async/SingleThreadTaskScheduler.cs/#L86">View Source</a>
  302. </span>
  303. <a id="IPA_Utilities_Async_SingleThreadTaskScheduler_GetScheduledTasks_" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.GetScheduledTasks*"></a>
  304. <h4 id="IPA_Utilities_Async_SingleThreadTaskScheduler_GetScheduledTasks" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.GetScheduledTasks">GetScheduledTasks()</h4>
  305. <div class="markdown level1 summary"><p>Throws a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a>.</p>
  306. </div>
  307. <div class="markdown level1 conceptual"></div>
  308. <h5 class="decalaration">Declaration</h5>
  309. <div class="codewrapper">
  310. <pre><code class="lang-csharp hljs">protected override IEnumerable&lt;Task&gt; GetScheduledTasks()</code></pre>
  311. </div>
  312. <h5 class="returns">Returns</h5>
  313. <table class="table table-bordered table-striped table-condensed">
  314. <thead>
  315. <tr>
  316. <th>Type</th>
  317. <th>Description</th>
  318. </tr>
  319. </thead>
  320. <tbody>
  321. <tr>
  322. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a>&gt;</td>
  323. <td><p>nothing</p>
  324. </td>
  325. </tr>
  326. </tbody>
  327. </table>
  328. <h5 class="overrides">Overrides</h5>
  329. <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler.getscheduledtasks#system-threading-tasks-taskscheduler-getscheduledtasks">TaskScheduler.GetScheduledTasks()</a></div>
  330. <h5 class="exceptions">Exceptions</h5>
  331. <table class="table table-bordered table-striped table-condensed">
  332. <thead>
  333. <tr>
  334. <th>Type</th>
  335. <th>Condition</th>
  336. </tr>
  337. </thead>
  338. <tbody>
  339. <tr>
  340. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></td>
  341. <td><p>Always.</p>
  342. </td>
  343. </tr>
  344. </tbody>
  345. </table>
  346. <span class="small pull-right mobile-hide">
  347. <span class="divider">|</span>
  348. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_SingleThreadTaskScheduler_Join.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.SingleThreadTaskScheduler.Join%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>
  349. </span>
  350. <span class="small pull-right mobile-hide">
  351. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/80222a6da147bae9b95433ef78d03c5dd581e465/IPA.Loader/Utilities/Async/SingleThreadTaskScheduler.cs/#L73">View Source</a>
  352. </span>
  353. <a id="IPA_Utilities_Async_SingleThreadTaskScheduler_Join_" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.Join*"></a>
  354. <h4 id="IPA_Utilities_Async_SingleThreadTaskScheduler_Join" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.Join">Join()</h4>
  355. <div class="markdown level1 summary"><p>Waits for the runner thread to complete all tasks in the queue, then exits.</p>
  356. </div>
  357. <div class="markdown level1 conceptual"></div>
  358. <h5 class="decalaration">Declaration</h5>
  359. <div class="codewrapper">
  360. <pre><code class="lang-csharp hljs">public void Join()</code></pre>
  361. </div>
  362. <h5 id="IPA_Utilities_Async_SingleThreadTaskScheduler_Join_remarks">Remarks</h5>
  363. <div class="markdown level1 remarks"><p>After this method returns, this object has been disposed and is no longer in a valid state.</p>
  364. </div>
  365. <h5 class="exceptions">Exceptions</h5>
  366. <table class="table table-bordered table-striped table-condensed">
  367. <thead>
  368. <tr>
  369. <th>Type</th>
  370. <th>Condition</th>
  371. </tr>
  372. </thead>
  373. <tbody>
  374. <tr>
  375. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  376. <td><p>Thrown if this object has already been disposed.</p>
  377. </td>
  378. </tr>
  379. </tbody>
  380. </table>
  381. <span class="small pull-right mobile-hide">
  382. <span class="divider">|</span>
  383. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_SingleThreadTaskScheduler_QueueTask_System_Threading_Tasks_Task_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.SingleThreadTaskScheduler.QueueTask(System.Threading.Tasks.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>
  384. </span>
  385. <span class="small pull-right mobile-hide">
  386. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/80222a6da147bae9b95433ef78d03c5dd581e465/IPA.Loader/Utilities/Async/SingleThreadTaskScheduler.cs/#L98">View Source</a>
  387. </span>
  388. <a id="IPA_Utilities_Async_SingleThreadTaskScheduler_QueueTask_" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.QueueTask*"></a>
  389. <h4 id="IPA_Utilities_Async_SingleThreadTaskScheduler_QueueTask_System_Threading_Tasks_Task_" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.QueueTask(System.Threading.Tasks.Task)">QueueTask(Task)</h4>
  390. <div class="markdown level1 summary"><p>Queues a given <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a> to this scheduler. The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a> <em>must&gt;</em> be
  391. scheduled for this <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler">TaskScheduler</a> by the runtime.</p>
  392. </div>
  393. <div class="markdown level1 conceptual"></div>
  394. <h5 class="decalaration">Declaration</h5>
  395. <div class="codewrapper">
  396. <pre><code class="lang-csharp hljs">protected override void QueueTask(Task task)</code></pre>
  397. </div>
  398. <h5 class="parameters">Parameters</h5>
  399. <table class="table table-bordered table-striped table-condensed">
  400. <thead>
  401. <tr>
  402. <th>Type</th>
  403. <th>Name</th>
  404. <th>Description</th>
  405. </tr>
  406. </thead>
  407. <tbody>
  408. <tr>
  409. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></td>
  410. <td><span class="parametername">task</span></td>
  411. <td><p>the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a> to queue</p>
  412. </td>
  413. </tr>
  414. </tbody>
  415. </table>
  416. <h5 class="overrides">Overrides</h5>
  417. <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler.queuetask#system-threading-tasks-taskscheduler-queuetask(system-threading-tasks-task)">TaskScheduler.QueueTask(Task)</a></div>
  418. <h5 class="exceptions">Exceptions</h5>
  419. <table class="table table-bordered table-striped table-condensed">
  420. <thead>
  421. <tr>
  422. <th>Type</th>
  423. <th>Condition</th>
  424. </tr>
  425. </thead>
  426. <tbody>
  427. <tr>
  428. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  429. <td><p>Thrown if this object has already been disposed.</p>
  430. </td>
  431. </tr>
  432. </tbody>
  433. </table>
  434. <span class="small pull-right mobile-hide">
  435. <span class="divider">|</span>
  436. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_SingleThreadTaskScheduler_Start.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.SingleThreadTaskScheduler.Start%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>
  437. </span>
  438. <span class="small pull-right mobile-hide">
  439. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/80222a6da147bae9b95433ef78d03c5dd581e465/IPA.Loader/Utilities/Async/SingleThreadTaskScheduler.cs/#L37">View Source</a>
  440. </span>
  441. <a id="IPA_Utilities_Async_SingleThreadTaskScheduler_Start_" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.Start*"></a>
  442. <h4 id="IPA_Utilities_Async_SingleThreadTaskScheduler_Start" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.Start">Start()</h4>
  443. <div class="markdown level1 summary"><p>Starts the thread that executes tasks scheduled with this <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler">TaskScheduler</a></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">public void Start()</code></pre>
  449. </div>
  450. <h5 class="exceptions">Exceptions</h5>
  451. <table class="table table-bordered table-striped table-condensed">
  452. <thead>
  453. <tr>
  454. <th>Type</th>
  455. <th>Condition</th>
  456. </tr>
  457. </thead>
  458. <tbody>
  459. <tr>
  460. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  461. <td><p>Thrown if this object has already been disposed.</p>
  462. </td>
  463. </tr>
  464. </tbody>
  465. </table>
  466. <span class="small pull-right mobile-hide">
  467. <span class="divider">|</span>
  468. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_SingleThreadTaskScheduler_TryExecuteTaskInline_System_Threading_Tasks_Task_System_Boolean_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.SingleThreadTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.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>
  469. </span>
  470. <span class="small pull-right mobile-hide">
  471. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/80222a6da147bae9b95433ef78d03c5dd581e465/IPA.Loader/Utilities/Async/SingleThreadTaskScheduler.cs/#L116">View Source</a>
  472. </span>
  473. <a id="IPA_Utilities_Async_SingleThreadTaskScheduler_TryExecuteTaskInline_" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.TryExecuteTaskInline*"></a>
  474. <h4 id="IPA_Utilities_Async_SingleThreadTaskScheduler_TryExecuteTaskInline_System_Threading_Tasks_Task_System_Boolean_" data-uid="IPA.Utilities.Async.SingleThreadTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task,System.Boolean)">TryExecuteTaskInline(Task, Boolean)</h4>
  475. <div class="markdown level1 summary"><p>Rejects any attempts to execute a task inline.</p>
  476. </div>
  477. <div class="markdown level1 conceptual"></div>
  478. <h5 class="decalaration">Declaration</h5>
  479. <div class="codewrapper">
  480. <pre><code class="lang-csharp hljs">protected override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued)</code></pre>
  481. </div>
  482. <h5 class="parameters">Parameters</h5>
  483. <table class="table table-bordered table-striped table-condensed">
  484. <thead>
  485. <tr>
  486. <th>Type</th>
  487. <th>Name</th>
  488. <th>Description</th>
  489. </tr>
  490. </thead>
  491. <tbody>
  492. <tr>
  493. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></td>
  494. <td><span class="parametername">task</span></td>
  495. <td><p>the task to attempt to execute</p>
  496. </td>
  497. </tr>
  498. <tr>
  499. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  500. <td><span class="parametername">taskWasPreviouslyQueued</span></td>
  501. <td><p>whether the task was previously queued to this scheduler</p>
  502. </td>
  503. </tr>
  504. </tbody>
  505. </table>
  506. <h5 class="returns">Returns</h5>
  507. <table class="table table-bordered table-striped table-condensed">
  508. <thead>
  509. <tr>
  510. <th>Type</th>
  511. <th>Description</th>
  512. </tr>
  513. </thead>
  514. <tbody>
  515. <tr>
  516. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
  517. <td><span class="xref">false</span></td>
  518. </tr>
  519. </tbody>
  520. </table>
  521. <h5 class="overrides">Overrides</h5>
  522. <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskscheduler.tryexecutetaskinline#system-threading-tasks-taskscheduler-tryexecutetaskinline(system-threading-tasks-task-system-boolean)">TaskScheduler.TryExecuteTaskInline(Task, Boolean)</a></div>
  523. <h5 id="IPA_Utilities_Async_SingleThreadTaskScheduler_TryExecuteTaskInline_System_Threading_Tasks_Task_System_Boolean__remarks">Remarks</h5>
  524. <div class="markdown level1 remarks"><p>This task scheduler <em>always</em> runs its tasks on the thread that it manages, therefore it doesn&apos;t
  525. make sense to run it inline.</p>
  526. </div>
  527. <h5 class="exceptions">Exceptions</h5>
  528. <table class="table table-bordered table-striped table-condensed">
  529. <thead>
  530. <tr>
  531. <th>Type</th>
  532. <th>Condition</th>
  533. </tr>
  534. </thead>
  535. <tbody>
  536. <tr>
  537. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.objectdisposedexception">ObjectDisposedException</a></td>
  538. <td><p>Thrown if this object has already been disposed.</p>
  539. </td>
  540. </tr>
  541. </tbody>
  542. </table>
  543. <h3 id="implements">Implements</h3>
  544. <div>
  545. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">System.IDisposable</a>
  546. </div>
  547. <h3 id="extensionmethods">Extension Methods</h3>
  548. <div>
  549. <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>
  550. </div>
  551. <div>
  552. <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>
  553. </div>
  554. <div>
  555. <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>
  556. </div>
  557. <div>
  558. <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>
  559. </div>
  560. <div>
  561. <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>
  562. </div>
  563. </article>
  564. </div>
  565. <div class="hidden-sm col-md-2" role="complementary">
  566. <div class="sideaffix">
  567. <div class="contribution">
  568. <ul class="nav">
  569. <li>
  570. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_SingleThreadTaskScheduler.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.SingleThreadTaskScheduler%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>
  571. </li>
  572. <li>
  573. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/80222a6da147bae9b95433ef78d03c5dd581e465/IPA.Loader/Utilities/Async/SingleThreadTaskScheduler.cs/#L14" class="contribution-link">View Source</a>
  574. </li>
  575. </ul>
  576. </div>
  577. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  578. <h5>In This Article</h5>
  579. <div></div>
  580. </nav>
  581. </div>
  582. </div>
  583. </div>
  584. </div>
  585. <footer>
  586. <div class="grad-bottom"></div>
  587. <div class="footer">
  588. <div class="container">
  589. <span class="pull-right">
  590. <a href="#top">Back to top</a>
  591. </span>
  592. <span>Generated by <strong>DocFX</strong></span>
  593. </div>
  594. </div>
  595. </footer>
  596. </div>
  597. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  598. <script type="text/javascript" src="../styles/docfx.js"></script>
  599. <script type="text/javascript" src="../styles/main.js"></script>
  600. </body>
  601. </html>