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.

527 lines
26 KiB

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 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 Synchronization
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Synchronization
  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.Synchronization">
  75. <h1 id="IPA_Utilities_Async_Synchronization" data-uid="IPA.Utilities.Async.Synchronization" class="text-break">Class Synchronization
  76. </h1>
  77. <div class="markdown level0 summary"><p>Utilities for inter-thread synchronization. All Locker method acquire their object immediately,
  78. and should only be used with <span class="xref">langword_csharp_using</span> to automatically release them.</p>
  79. </div>
  80. <div class="markdown level0 conceptual"></div>
  81. <div class="inheritance">
  82. <h5>Inheritance</h5>
  83. <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">Object</a></div>
  84. <div class="level1"><span class="xref">Synchronization</span></div>
  85. </div>
  86. <div class="inheritedMembers">
  87. <h5>Inherited Members</h5>
  88. <div>
  89. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring#system-object-tostring">Object.ToString()</a>
  90. </div>
  91. <div>
  92. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">Object.Equals(Object)</a>
  93. </div>
  94. <div>
  95. <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>
  96. </div>
  97. <div>
  98. <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>
  99. </div>
  100. <div>
  101. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode#system-object-gethashcode">Object.GetHashCode()</a>
  102. </div>
  103. <div>
  104. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype#system-object-gettype">Object.GetType()</a>
  105. </div>
  106. <div>
  107. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone#system-object-memberwiseclone">Object.MemberwiseClone()</a>
  108. </div>
  109. </div>
  110. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Utilities.Async.html">IPA.Utilities.Async</a></h6>
  111. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  112. <h5 id="IPA_Utilities_Async_Synchronization_syntax">Syntax</h5>
  113. <div class="codewrapper">
  114. <pre><code class="lang-csharp hljs">public static class Synchronization</code></pre>
  115. </div>
  116. <h5 id="IPA_Utilities_Async_Synchronization_examples"><strong>Examples</strong></h5>
  117. <p><p>
  118. The canonical usage of <em>all</em> of the member functions is as follows, substituting <a class="xref" href="IPA.Utilities.Async.Synchronization.html#IPA_Utilities_Async_Synchronization_Lock_System_Threading_Mutex_">Lock(Mutex)</a>
  119. with whichever member you want to use, according to your lock type.
  120. </p></p>
  121. <pre><code>using var _locker = Synchronization.Lock(mutex);</code></pre>
  122. <h3 id="methods">Methods
  123. </h3>
  124. <span class="small pull-right mobile-hide">
  125. <span class="divider">|</span>
  126. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_Synchronization_Lock_System_Threading_Mutex_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.Synchronization.Lock(System.Threading.Mutex)%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>
  127. </span>
  128. <span class="small pull-right mobile-hide">
  129. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/607ab516a4167c897fc4f07fce11fb60225379a5/IPA.Loader/Utilities/Async/Synchronization.cs/#L176">View Source</a>
  130. </span>
  131. <a id="IPA_Utilities_Async_Synchronization_Lock_" data-uid="IPA.Utilities.Async.Synchronization.Lock*"></a>
  132. <h4 id="IPA_Utilities_Async_Synchronization_Lock_System_Threading_Mutex_" data-uid="IPA.Utilities.Async.Synchronization.Lock(System.Threading.Mutex)">Lock(Mutex)</h4>
  133. <div class="markdown level1 summary"><p>Creates a locker for a mutex.</p>
  134. </div>
  135. <div class="markdown level1 conceptual"></div>
  136. <h5 class="decalaration">Declaration</h5>
  137. <div class="codewrapper">
  138. <pre><code class="lang-csharp hljs">public static Synchronization.MutexLocker Lock(Mutex mut)</code></pre>
  139. </div>
  140. <h5 class="parameters">Parameters</h5>
  141. <table class="table table-bordered table-striped table-condensed">
  142. <thead>
  143. <tr>
  144. <th>Type</th>
  145. <th>Name</th>
  146. <th>Description</th>
  147. </tr>
  148. </thead>
  149. <tbody>
  150. <tr>
  151. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.mutex">Mutex</a></td>
  152. <td><span class="parametername">mut</span></td>
  153. <td><p>the mutex to acquire</p>
  154. </td>
  155. </tr>
  156. </tbody>
  157. </table>
  158. <h5 class="returns">Returns</h5>
  159. <table class="table table-bordered table-striped table-condensed">
  160. <thead>
  161. <tr>
  162. <th>Type</th>
  163. <th>Description</th>
  164. </tr>
  165. </thead>
  166. <tbody>
  167. <tr>
  168. <td><a class="xref" href="IPA.Utilities.Async.Synchronization.MutexLocker.html">Synchronization.MutexLocker</a></td>
  169. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  170. </td>
  171. </tr>
  172. </tbody>
  173. </table>
  174. <span class="small pull-right mobile-hide">
  175. <span class="divider">|</span>
  176. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_Synchronization_Lock_System_Threading_Semaphore_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.Synchronization.Lock(System.Threading.Semaphore)%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>
  177. </span>
  178. <span class="small pull-right mobile-hide">
  179. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/607ab516a4167c897fc4f07fce11fb60225379a5/IPA.Loader/Utilities/Async/Synchronization.cs/#L183">View Source</a>
  180. </span>
  181. <a id="IPA_Utilities_Async_Synchronization_Lock_" data-uid="IPA.Utilities.Async.Synchronization.Lock*"></a>
  182. <h4 id="IPA_Utilities_Async_Synchronization_Lock_System_Threading_Semaphore_" data-uid="IPA.Utilities.Async.Synchronization.Lock(System.Threading.Semaphore)">Lock(Semaphore)</h4>
  183. <div class="markdown level1 summary"><p>Creates a locker for a semaphore.</p>
  184. </div>
  185. <div class="markdown level1 conceptual"></div>
  186. <h5 class="decalaration">Declaration</h5>
  187. <div class="codewrapper">
  188. <pre><code class="lang-csharp hljs">public static Synchronization.SemaphoreLocker Lock(Semaphore sem)</code></pre>
  189. </div>
  190. <h5 class="parameters">Parameters</h5>
  191. <table class="table table-bordered table-striped table-condensed">
  192. <thead>
  193. <tr>
  194. <th>Type</th>
  195. <th>Name</th>
  196. <th>Description</th>
  197. </tr>
  198. </thead>
  199. <tbody>
  200. <tr>
  201. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.semaphore">Semaphore</a></td>
  202. <td><span class="parametername">sem</span></td>
  203. <td><p>the semaphore to acquire</p>
  204. </td>
  205. </tr>
  206. </tbody>
  207. </table>
  208. <h5 class="returns">Returns</h5>
  209. <table class="table table-bordered table-striped table-condensed">
  210. <thead>
  211. <tr>
  212. <th>Type</th>
  213. <th>Description</th>
  214. </tr>
  215. </thead>
  216. <tbody>
  217. <tr>
  218. <td><a class="xref" href="IPA.Utilities.Async.Synchronization.SemaphoreLocker.html">Synchronization.SemaphoreLocker</a></td>
  219. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  220. </td>
  221. </tr>
  222. </tbody>
  223. </table>
  224. <span class="small pull-right mobile-hide">
  225. <span class="divider">|</span>
  226. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_Synchronization_Lock_System_Threading_SemaphoreSlim_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.Synchronization.Lock(System.Threading.SemaphoreSlim)%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>
  227. </span>
  228. <span class="small pull-right mobile-hide">
  229. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/607ab516a4167c897fc4f07fce11fb60225379a5/IPA.Loader/Utilities/Async/Synchronization.cs/#L190">View Source</a>
  230. </span>
  231. <a id="IPA_Utilities_Async_Synchronization_Lock_" data-uid="IPA.Utilities.Async.Synchronization.Lock*"></a>
  232. <h4 id="IPA_Utilities_Async_Synchronization_Lock_System_Threading_SemaphoreSlim_" data-uid="IPA.Utilities.Async.Synchronization.Lock(System.Threading.SemaphoreSlim)">Lock(SemaphoreSlim)</h4>
  233. <div class="markdown level1 summary"><p>Creates a locker for a slim semaphore.</p>
  234. </div>
  235. <div class="markdown level1 conceptual"></div>
  236. <h5 class="decalaration">Declaration</h5>
  237. <div class="codewrapper">
  238. <pre><code class="lang-csharp hljs">public static Synchronization.SemaphoreSlimLocker Lock(SemaphoreSlim sem)</code></pre>
  239. </div>
  240. <h5 class="parameters">Parameters</h5>
  241. <table class="table table-bordered table-striped table-condensed">
  242. <thead>
  243. <tr>
  244. <th>Type</th>
  245. <th>Name</th>
  246. <th>Description</th>
  247. </tr>
  248. </thead>
  249. <tbody>
  250. <tr>
  251. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.semaphoreslim">SemaphoreSlim</a></td>
  252. <td><span class="parametername">sem</span></td>
  253. <td><p>the slim semaphore to acquire</p>
  254. </td>
  255. </tr>
  256. </tbody>
  257. </table>
  258. <h5 class="returns">Returns</h5>
  259. <table class="table table-bordered table-striped table-condensed">
  260. <thead>
  261. <tr>
  262. <th>Type</th>
  263. <th>Description</th>
  264. </tr>
  265. </thead>
  266. <tbody>
  267. <tr>
  268. <td><a class="xref" href="IPA.Utilities.Async.Synchronization.SemaphoreSlimLocker.html">Synchronization.SemaphoreSlimLocker</a></td>
  269. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  270. </td>
  271. </tr>
  272. </tbody>
  273. </table>
  274. <span class="small pull-right mobile-hide">
  275. <span class="divider">|</span>
  276. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_Synchronization_LockAsync_System_Threading_SemaphoreSlim_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.Synchronization.LockAsync(System.Threading.SemaphoreSlim)%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>
  277. </span>
  278. <span class="small pull-right mobile-hide">
  279. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/607ab516a4167c897fc4f07fce11fb60225379a5/IPA.Loader/Utilities/Async/Synchronization.cs/#L198">View Source</a>
  280. </span>
  281. <a id="IPA_Utilities_Async_Synchronization_LockAsync_" data-uid="IPA.Utilities.Async.Synchronization.LockAsync*"></a>
  282. <h4 id="IPA_Utilities_Async_Synchronization_LockAsync_System_Threading_SemaphoreSlim_" data-uid="IPA.Utilities.Async.Synchronization.LockAsync(System.Threading.SemaphoreSlim)">LockAsync(SemaphoreSlim)</h4>
  283. <div class="markdown level1 summary"><p>Creates a locker for a slim semaphore asynchronously.</p>
  284. </div>
  285. <div class="markdown level1 conceptual"></div>
  286. <h5 class="decalaration">Declaration</h5>
  287. <div class="codewrapper">
  288. <pre><code class="lang-csharp hljs">public static async Task&lt;Synchronization.SemaphoreSlimAsyncLocker&gt; LockAsync(SemaphoreSlim sem)</code></pre>
  289. </div>
  290. <h5 class="parameters">Parameters</h5>
  291. <table class="table table-bordered table-striped table-condensed">
  292. <thead>
  293. <tr>
  294. <th>Type</th>
  295. <th>Name</th>
  296. <th>Description</th>
  297. </tr>
  298. </thead>
  299. <tbody>
  300. <tr>
  301. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.semaphoreslim">SemaphoreSlim</a></td>
  302. <td><span class="parametername">sem</span></td>
  303. <td><p>the slim semaphore to acquire async</p>
  304. </td>
  305. </tr>
  306. </tbody>
  307. </table>
  308. <h5 class="returns">Returns</h5>
  309. <table class="table table-bordered table-striped table-condensed">
  310. <thead>
  311. <tr>
  312. <th>Type</th>
  313. <th>Description</th>
  314. </tr>
  315. </thead>
  316. <tbody>
  317. <tr>
  318. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="IPA.Utilities.Async.Synchronization.SemaphoreSlimAsyncLocker.html">Synchronization.SemaphoreSlimAsyncLocker</a>&gt;</td>
  319. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  320. </td>
  321. </tr>
  322. </tbody>
  323. </table>
  324. <span class="small pull-right mobile-hide">
  325. <span class="divider">|</span>
  326. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_Synchronization_LockRead_System_Threading_ReaderWriterLockSlim_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.Synchronization.LockRead(System.Threading.ReaderWriterLockSlim)%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>
  327. </span>
  328. <span class="small pull-right mobile-hide">
  329. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/607ab516a4167c897fc4f07fce11fb60225379a5/IPA.Loader/Utilities/Async/Synchronization.cs/#L218">View Source</a>
  330. </span>
  331. <a id="IPA_Utilities_Async_Synchronization_LockRead_" data-uid="IPA.Utilities.Async.Synchronization.LockRead*"></a>
  332. <h4 id="IPA_Utilities_Async_Synchronization_LockRead_System_Threading_ReaderWriterLockSlim_" data-uid="IPA.Utilities.Async.Synchronization.LockRead(System.Threading.ReaderWriterLockSlim)">LockRead(ReaderWriterLockSlim)</h4>
  333. <div class="markdown level1 summary"><p>Creates a locker for a read lock on a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.readerwriterlockslim">ReaderWriterLockSlim</a>.</p>
  334. </div>
  335. <div class="markdown level1 conceptual"></div>
  336. <h5 class="decalaration">Declaration</h5>
  337. <div class="codewrapper">
  338. <pre><code class="lang-csharp hljs">public static Synchronization.ReaderWriterLockSlimReadLocker LockRead(ReaderWriterLockSlim rwl)</code></pre>
  339. </div>
  340. <h5 class="parameters">Parameters</h5>
  341. <table class="table table-bordered table-striped table-condensed">
  342. <thead>
  343. <tr>
  344. <th>Type</th>
  345. <th>Name</th>
  346. <th>Description</th>
  347. </tr>
  348. </thead>
  349. <tbody>
  350. <tr>
  351. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.readerwriterlockslim">ReaderWriterLockSlim</a></td>
  352. <td><span class="parametername">rwl</span></td>
  353. <td><p>the lock to acquire in read mode</p>
  354. </td>
  355. </tr>
  356. </tbody>
  357. </table>
  358. <h5 class="returns">Returns</h5>
  359. <table class="table table-bordered table-striped table-condensed">
  360. <thead>
  361. <tr>
  362. <th>Type</th>
  363. <th>Description</th>
  364. </tr>
  365. </thead>
  366. <tbody>
  367. <tr>
  368. <td><a class="xref" href="IPA.Utilities.Async.Synchronization.ReaderWriterLockSlimReadLocker.html">Synchronization.ReaderWriterLockSlimReadLocker</a></td>
  369. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  370. </td>
  371. </tr>
  372. </tbody>
  373. </table>
  374. <span class="small pull-right mobile-hide">
  375. <span class="divider">|</span>
  376. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_Synchronization_LockReadUpgradable_System_Threading_ReaderWriterLockSlim_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.Synchronization.LockReadUpgradable(System.Threading.ReaderWriterLockSlim)%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>
  377. </span>
  378. <span class="small pull-right mobile-hide">
  379. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/607ab516a4167c897fc4f07fce11fb60225379a5/IPA.Loader/Utilities/Async/Synchronization.cs/#L225">View Source</a>
  380. </span>
  381. <a id="IPA_Utilities_Async_Synchronization_LockReadUpgradable_" data-uid="IPA.Utilities.Async.Synchronization.LockReadUpgradable*"></a>
  382. <h4 id="IPA_Utilities_Async_Synchronization_LockReadUpgradable_System_Threading_ReaderWriterLockSlim_" data-uid="IPA.Utilities.Async.Synchronization.LockReadUpgradable(System.Threading.ReaderWriterLockSlim)">LockReadUpgradable(ReaderWriterLockSlim)</h4>
  383. <div class="markdown level1 summary"><p>Creates a locker for an upgradable read lock on a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.readerwriterlockslim">ReaderWriterLockSlim</a>.</p>
  384. </div>
  385. <div class="markdown level1 conceptual"></div>
  386. <h5 class="decalaration">Declaration</h5>
  387. <div class="codewrapper">
  388. <pre><code class="lang-csharp hljs">public static Synchronization.ReaderWriterLockSlimUpgradableReadLocker LockReadUpgradable(ReaderWriterLockSlim rwl)</code></pre>
  389. </div>
  390. <h5 class="parameters">Parameters</h5>
  391. <table class="table table-bordered table-striped table-condensed">
  392. <thead>
  393. <tr>
  394. <th>Type</th>
  395. <th>Name</th>
  396. <th>Description</th>
  397. </tr>
  398. </thead>
  399. <tbody>
  400. <tr>
  401. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.readerwriterlockslim">ReaderWriterLockSlim</a></td>
  402. <td><span class="parametername">rwl</span></td>
  403. <td><p>the lock to acquire in upgradable read mode</p>
  404. </td>
  405. </tr>
  406. </tbody>
  407. </table>
  408. <h5 class="returns">Returns</h5>
  409. <table class="table table-bordered table-striped table-condensed">
  410. <thead>
  411. <tr>
  412. <th>Type</th>
  413. <th>Description</th>
  414. </tr>
  415. </thead>
  416. <tbody>
  417. <tr>
  418. <td><a class="xref" href="IPA.Utilities.Async.Synchronization.ReaderWriterLockSlimUpgradableReadLocker.html">Synchronization.ReaderWriterLockSlimUpgradableReadLocker</a></td>
  419. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  420. </td>
  421. </tr>
  422. </tbody>
  423. </table>
  424. <span class="small pull-right mobile-hide">
  425. <span class="divider">|</span>
  426. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_Synchronization_LockWrite_System_Threading_ReaderWriterLockSlim_.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.Synchronization.LockWrite(System.Threading.ReaderWriterLockSlim)%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>
  427. </span>
  428. <span class="small pull-right mobile-hide">
  429. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/607ab516a4167c897fc4f07fce11fb60225379a5/IPA.Loader/Utilities/Async/Synchronization.cs/#L211">View Source</a>
  430. </span>
  431. <a id="IPA_Utilities_Async_Synchronization_LockWrite_" data-uid="IPA.Utilities.Async.Synchronization.LockWrite*"></a>
  432. <h4 id="IPA_Utilities_Async_Synchronization_LockWrite_System_Threading_ReaderWriterLockSlim_" data-uid="IPA.Utilities.Async.Synchronization.LockWrite(System.Threading.ReaderWriterLockSlim)">LockWrite(ReaderWriterLockSlim)</h4>
  433. <div class="markdown level1 summary"><p>Creates a locker for a write lock <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.readerwriterlockslim">ReaderWriterLockSlim</a>.</p>
  434. </div>
  435. <div class="markdown level1 conceptual"></div>
  436. <h5 class="decalaration">Declaration</h5>
  437. <div class="codewrapper">
  438. <pre><code class="lang-csharp hljs">public static Synchronization.ReaderWriterLockSlimWriteLocker LockWrite(ReaderWriterLockSlim rwl)</code></pre>
  439. </div>
  440. <h5 class="parameters">Parameters</h5>
  441. <table class="table table-bordered table-striped table-condensed">
  442. <thead>
  443. <tr>
  444. <th>Type</th>
  445. <th>Name</th>
  446. <th>Description</th>
  447. </tr>
  448. </thead>
  449. <tbody>
  450. <tr>
  451. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.readerwriterlockslim">ReaderWriterLockSlim</a></td>
  452. <td><span class="parametername">rwl</span></td>
  453. <td><p>the lock to acquire in write mode</p>
  454. </td>
  455. </tr>
  456. </tbody>
  457. </table>
  458. <h5 class="returns">Returns</h5>
  459. <table class="table table-bordered table-striped table-condensed">
  460. <thead>
  461. <tr>
  462. <th>Type</th>
  463. <th>Description</th>
  464. </tr>
  465. </thead>
  466. <tbody>
  467. <tr>
  468. <td><a class="xref" href="IPA.Utilities.Async.Synchronization.ReaderWriterLockSlimWriteLocker.html">Synchronization.ReaderWriterLockSlimWriteLocker</a></td>
  469. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  470. </td>
  471. </tr>
  472. </tbody>
  473. </table>
  474. </article>
  475. </div>
  476. <div class="hidden-sm col-md-2" role="complementary">
  477. <div class="sideaffix">
  478. <div class="contribution">
  479. <ul class="nav">
  480. <li>
  481. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_Async_Synchronization.md&amp;value=---%0Auid%3A%20IPA.Utilities.Async.Synchronization%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>
  482. </li>
  483. <li>
  484. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/607ab516a4167c897fc4f07fce11fb60225379a5/IPA.Loader/Utilities/Async/Synchronization.cs/#L26" class="contribution-link">View Source</a>
  485. </li>
  486. </ul>
  487. </div>
  488. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  489. <h5>In This Article</h5>
  490. <div></div>
  491. </nav>
  492. </div>
  493. </div>
  494. </div>
  495. </div>
  496. <footer>
  497. <div class="grad-bottom"></div>
  498. <div class="footer">
  499. <div class="container">
  500. <span class="pull-right">
  501. <a href="#top">Back to top</a>
  502. </span>
  503. <span>Generated by <strong>DocFX</strong></span>
  504. </div>
  505. </div>
  506. </footer>
  507. </div>
  508. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  509. <script type="text/javascript" src="../styles/docfx.js"></script>
  510. <script type="text/javascript" src="../styles/main.js"></script>
  511. </body>
  512. </html>