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.

525 lines
26 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 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.48.0.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 href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
  18. <meta property="docfx:navrel" content="../toc.html">
  19. <meta property="docfx:tocrel" content="toc.html">
  20. <meta property="docfx:rel" content="../">
  21. <meta property="docfx:newtab" content="true">
  22. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  23. <div id="wrapper">
  24. <header>
  25. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  26. <div class="container">
  27. <div class="navbar-header">
  28. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  29. <span class="sr-only">Toggle navigation</span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. </button>
  34. <a class="navbar-brand" href="../index.html">
  35. <img id="logo" class="svg" src="../logo.svg" alt="">
  36. </a>
  37. </div>
  38. <div class="collapse navbar-collapse" id="navbar">
  39. <form class="navbar-form navbar-right" role="search" id="search">
  40. <div class="form-group">
  41. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  42. </div>
  43. </form>
  44. </div>
  45. </div>
  46. </nav>
  47. <div class="subnav navbar navbar-default">
  48. <div class="container hide-when-search" id="breadcrumb">
  49. <ul class="breadcrumb">
  50. <li></li>
  51. </ul>
  52. </div>
  53. </div>
  54. </header>
  55. <div class="container body-content">
  56. <div id="search-results">
  57. <div class="search-list"></div>
  58. <div class="sr-items">
  59. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  60. </div>
  61. <ul id="pagination"></ul>
  62. </div>
  63. </div>
  64. <div role="main" class="container body-content hide-when-search">
  65. <div class="sidenav hide-when-search">
  66. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  67. <div class="sidetoggle collapse" id="sidetoggle">
  68. <div id="sidetoc"></div>
  69. </div>
  70. </div>
  71. <div class="article row grid-right">
  72. <div class="col-md-10">
  73. <article class="content wrap" id="_content" data-uid="IPA.Utilities.Async.Synchronization">
  74. <h1 id="IPA_Utilities_Async_Synchronization" data-uid="IPA.Utilities.Async.Synchronization" class="text-break">Class Synchronization
  75. </h1>
  76. <div class="markdown level0 summary"><p>Utilities for inter-thread synchronization. All Locker method acquire their object immediately,
  77. and should only be used with <span class="xref">langword_csharp_using</span> to automatically release them.</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">Synchronization</span></div>
  84. </div>
  85. <div class="inheritedMembers">
  86. <h5>Inherited Members</h5>
  87. <div>
  88. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.tostring#System_Object_ToString">Object.ToString()</a>
  89. </div>
  90. <div>
  91. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#System_Object_Equals_System_Object_">Object.Equals(Object)</a>
  92. </div>
  93. <div>
  94. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#System_Object_Equals_System_Object_System_Object_">Object.Equals(Object, Object)</a>
  95. </div>
  96. <div>
  97. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.referenceequals#System_Object_ReferenceEquals_System_Object_System_Object_">Object.ReferenceEquals(Object, Object)</a>
  98. </div>
  99. <div>
  100. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gethashcode#System_Object_GetHashCode">Object.GetHashCode()</a>
  101. </div>
  102. <div>
  103. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gettype#System_Object_GetType">Object.GetType()</a>
  104. </div>
  105. <div>
  106. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.memberwiseclone#System_Object_MemberwiseClone">Object.MemberwiseClone()</a>
  107. </div>
  108. </div>
  109. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Utilities.Async.html">IPA.Utilities.Async</a></h6>
  110. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  111. <h5 id="IPA_Utilities_Async_Synchronization_syntax">Syntax</h5>
  112. <div class="codewrapper">
  113. <pre><code class="lang-csharp hljs">public static class Synchronization</code></pre>
  114. </div>
  115. <h5 id="IPA_Utilities_Async_Synchronization_examples"><strong>Examples</strong></h5>
  116. <p><p>
  117. 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>
  118. with whichever member you want to use, according to your lock type.
  119. </p></p>
  120. <pre><code>using var _locker = Synchronization.Lock(mutex);</code></pre>
  121. <h3 id="methods">Methods
  122. </h3>
  123. <span class="small pull-right mobile-hide">
  124. <span class="divider">|</span>
  125. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/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>
  126. </span>
  127. <span class="small pull-right mobile-hide">
  128. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/9705692cbf53e5b1f7667f378696cf6ea482054b/IPA.Loader/Utilities/Async/Synchronization.cs/#L176">View Source</a>
  129. </span>
  130. <a id="IPA_Utilities_Async_Synchronization_Lock_" data-uid="IPA.Utilities.Async.Synchronization.Lock*"></a>
  131. <h4 id="IPA_Utilities_Async_Synchronization_Lock_System_Threading_Mutex_" data-uid="IPA.Utilities.Async.Synchronization.Lock(System.Threading.Mutex)">Lock(Mutex)</h4>
  132. <div class="markdown level1 summary"><p>Creates a locker for a mutex.</p>
  133. </div>
  134. <div class="markdown level1 conceptual"></div>
  135. <h5 class="decalaration">Declaration</h5>
  136. <div class="codewrapper">
  137. <pre><code class="lang-csharp hljs">public static Synchronization.MutexLocker Lock(Mutex mut)</code></pre>
  138. </div>
  139. <h5 class="parameters">Parameters</h5>
  140. <table class="table table-bordered table-striped table-condensed">
  141. <thead>
  142. <tr>
  143. <th>Type</th>
  144. <th>Name</th>
  145. <th>Description</th>
  146. </tr>
  147. </thead>
  148. <tbody>
  149. <tr>
  150. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.mutex">Mutex</a></td>
  151. <td><span class="parametername">mut</span></td>
  152. <td><p>the mutex to acquire</p>
  153. </td>
  154. </tr>
  155. </tbody>
  156. </table>
  157. <h5 class="returns">Returns</h5>
  158. <table class="table table-bordered table-striped table-condensed">
  159. <thead>
  160. <tr>
  161. <th>Type</th>
  162. <th>Description</th>
  163. </tr>
  164. </thead>
  165. <tbody>
  166. <tr>
  167. <td><a class="xref" href="IPA.Utilities.Async.Synchronization.MutexLocker.html">Synchronization.MutexLocker</a></td>
  168. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  169. </td>
  170. </tr>
  171. </tbody>
  172. </table>
  173. <span class="small pull-right mobile-hide">
  174. <span class="divider">|</span>
  175. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/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>
  176. </span>
  177. <span class="small pull-right mobile-hide">
  178. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/9705692cbf53e5b1f7667f378696cf6ea482054b/IPA.Loader/Utilities/Async/Synchronization.cs/#L183">View Source</a>
  179. </span>
  180. <a id="IPA_Utilities_Async_Synchronization_Lock_" data-uid="IPA.Utilities.Async.Synchronization.Lock*"></a>
  181. <h4 id="IPA_Utilities_Async_Synchronization_Lock_System_Threading_Semaphore_" data-uid="IPA.Utilities.Async.Synchronization.Lock(System.Threading.Semaphore)">Lock(Semaphore)</h4>
  182. <div class="markdown level1 summary"><p>Creates a locker for a semaphore.</p>
  183. </div>
  184. <div class="markdown level1 conceptual"></div>
  185. <h5 class="decalaration">Declaration</h5>
  186. <div class="codewrapper">
  187. <pre><code class="lang-csharp hljs">public static Synchronization.SemaphoreLocker Lock(Semaphore sem)</code></pre>
  188. </div>
  189. <h5 class="parameters">Parameters</h5>
  190. <table class="table table-bordered table-striped table-condensed">
  191. <thead>
  192. <tr>
  193. <th>Type</th>
  194. <th>Name</th>
  195. <th>Description</th>
  196. </tr>
  197. </thead>
  198. <tbody>
  199. <tr>
  200. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.semaphore">Semaphore</a></td>
  201. <td><span class="parametername">sem</span></td>
  202. <td><p>the semaphore to acquire</p>
  203. </td>
  204. </tr>
  205. </tbody>
  206. </table>
  207. <h5 class="returns">Returns</h5>
  208. <table class="table table-bordered table-striped table-condensed">
  209. <thead>
  210. <tr>
  211. <th>Type</th>
  212. <th>Description</th>
  213. </tr>
  214. </thead>
  215. <tbody>
  216. <tr>
  217. <td><a class="xref" href="IPA.Utilities.Async.Synchronization.SemaphoreLocker.html">Synchronization.SemaphoreLocker</a></td>
  218. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  219. </td>
  220. </tr>
  221. </tbody>
  222. </table>
  223. <span class="small pull-right mobile-hide">
  224. <span class="divider">|</span>
  225. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/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>
  226. </span>
  227. <span class="small pull-right mobile-hide">
  228. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/9705692cbf53e5b1f7667f378696cf6ea482054b/IPA.Loader/Utilities/Async/Synchronization.cs/#L190">View Source</a>
  229. </span>
  230. <a id="IPA_Utilities_Async_Synchronization_Lock_" data-uid="IPA.Utilities.Async.Synchronization.Lock*"></a>
  231. <h4 id="IPA_Utilities_Async_Synchronization_Lock_System_Threading_SemaphoreSlim_" data-uid="IPA.Utilities.Async.Synchronization.Lock(System.Threading.SemaphoreSlim)">Lock(SemaphoreSlim)</h4>
  232. <div class="markdown level1 summary"><p>Creates a locker for a slim semaphore.</p>
  233. </div>
  234. <div class="markdown level1 conceptual"></div>
  235. <h5 class="decalaration">Declaration</h5>
  236. <div class="codewrapper">
  237. <pre><code class="lang-csharp hljs">public static Synchronization.SemaphoreSlimLocker Lock(SemaphoreSlim sem)</code></pre>
  238. </div>
  239. <h5 class="parameters">Parameters</h5>
  240. <table class="table table-bordered table-striped table-condensed">
  241. <thead>
  242. <tr>
  243. <th>Type</th>
  244. <th>Name</th>
  245. <th>Description</th>
  246. </tr>
  247. </thead>
  248. <tbody>
  249. <tr>
  250. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.semaphoreslim">SemaphoreSlim</a></td>
  251. <td><span class="parametername">sem</span></td>
  252. <td><p>the slim semaphore to acquire</p>
  253. </td>
  254. </tr>
  255. </tbody>
  256. </table>
  257. <h5 class="returns">Returns</h5>
  258. <table class="table table-bordered table-striped table-condensed">
  259. <thead>
  260. <tr>
  261. <th>Type</th>
  262. <th>Description</th>
  263. </tr>
  264. </thead>
  265. <tbody>
  266. <tr>
  267. <td><a class="xref" href="IPA.Utilities.Async.Synchronization.SemaphoreSlimLocker.html">Synchronization.SemaphoreSlimLocker</a></td>
  268. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  269. </td>
  270. </tr>
  271. </tbody>
  272. </table>
  273. <span class="small pull-right mobile-hide">
  274. <span class="divider">|</span>
  275. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/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>
  276. </span>
  277. <span class="small pull-right mobile-hide">
  278. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/9705692cbf53e5b1f7667f378696cf6ea482054b/IPA.Loader/Utilities/Async/Synchronization.cs/#L198">View Source</a>
  279. </span>
  280. <a id="IPA_Utilities_Async_Synchronization_LockAsync_" data-uid="IPA.Utilities.Async.Synchronization.LockAsync*"></a>
  281. <h4 id="IPA_Utilities_Async_Synchronization_LockAsync_System_Threading_SemaphoreSlim_" data-uid="IPA.Utilities.Async.Synchronization.LockAsync(System.Threading.SemaphoreSlim)">LockAsync(SemaphoreSlim)</h4>
  282. <div class="markdown level1 summary"><p>Creates a locker for a slim semaphore asynchronously.</p>
  283. </div>
  284. <div class="markdown level1 conceptual"></div>
  285. <h5 class="decalaration">Declaration</h5>
  286. <div class="codewrapper">
  287. <pre><code class="lang-csharp hljs">public static Task&lt;Synchronization.SemaphoreSlimAsyncLocker&gt; LockAsync(SemaphoreSlim sem)</code></pre>
  288. </div>
  289. <h5 class="parameters">Parameters</h5>
  290. <table class="table table-bordered table-striped table-condensed">
  291. <thead>
  292. <tr>
  293. <th>Type</th>
  294. <th>Name</th>
  295. <th>Description</th>
  296. </tr>
  297. </thead>
  298. <tbody>
  299. <tr>
  300. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.semaphoreslim">SemaphoreSlim</a></td>
  301. <td><span class="parametername">sem</span></td>
  302. <td><p>the slim semaphore to acquire async</p>
  303. </td>
  304. </tr>
  305. </tbody>
  306. </table>
  307. <h5 class="returns">Returns</h5>
  308. <table class="table table-bordered table-striped table-condensed">
  309. <thead>
  310. <tr>
  311. <th>Type</th>
  312. <th>Description</th>
  313. </tr>
  314. </thead>
  315. <tbody>
  316. <tr>
  317. <td><a class="xref" href="https://docs.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>
  318. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  319. </td>
  320. </tr>
  321. </tbody>
  322. </table>
  323. <span class="small pull-right mobile-hide">
  324. <span class="divider">|</span>
  325. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/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>
  326. </span>
  327. <span class="small pull-right mobile-hide">
  328. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/9705692cbf53e5b1f7667f378696cf6ea482054b/IPA.Loader/Utilities/Async/Synchronization.cs/#L218">View Source</a>
  329. </span>
  330. <a id="IPA_Utilities_Async_Synchronization_LockRead_" data-uid="IPA.Utilities.Async.Synchronization.LockRead*"></a>
  331. <h4 id="IPA_Utilities_Async_Synchronization_LockRead_System_Threading_ReaderWriterLockSlim_" data-uid="IPA.Utilities.Async.Synchronization.LockRead(System.Threading.ReaderWriterLockSlim)">LockRead(ReaderWriterLockSlim)</h4>
  332. <div class="markdown level1 summary"><p>Creates a locker for a read lock on a <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.readerwriterlockslim">ReaderWriterLockSlim</a>.</p>
  333. </div>
  334. <div class="markdown level1 conceptual"></div>
  335. <h5 class="decalaration">Declaration</h5>
  336. <div class="codewrapper">
  337. <pre><code class="lang-csharp hljs">public static Synchronization.ReaderWriterLockSlimReadLocker LockRead(ReaderWriterLockSlim rwl)</code></pre>
  338. </div>
  339. <h5 class="parameters">Parameters</h5>
  340. <table class="table table-bordered table-striped table-condensed">
  341. <thead>
  342. <tr>
  343. <th>Type</th>
  344. <th>Name</th>
  345. <th>Description</th>
  346. </tr>
  347. </thead>
  348. <tbody>
  349. <tr>
  350. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.readerwriterlockslim">ReaderWriterLockSlim</a></td>
  351. <td><span class="parametername">rwl</span></td>
  352. <td><p>the lock to acquire in read mode</p>
  353. </td>
  354. </tr>
  355. </tbody>
  356. </table>
  357. <h5 class="returns">Returns</h5>
  358. <table class="table table-bordered table-striped table-condensed">
  359. <thead>
  360. <tr>
  361. <th>Type</th>
  362. <th>Description</th>
  363. </tr>
  364. </thead>
  365. <tbody>
  366. <tr>
  367. <td><a class="xref" href="IPA.Utilities.Async.Synchronization.ReaderWriterLockSlimReadLocker.html">Synchronization.ReaderWriterLockSlimReadLocker</a></td>
  368. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  369. </td>
  370. </tr>
  371. </tbody>
  372. </table>
  373. <span class="small pull-right mobile-hide">
  374. <span class="divider">|</span>
  375. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/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>
  376. </span>
  377. <span class="small pull-right mobile-hide">
  378. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/9705692cbf53e5b1f7667f378696cf6ea482054b/IPA.Loader/Utilities/Async/Synchronization.cs/#L225">View Source</a>
  379. </span>
  380. <a id="IPA_Utilities_Async_Synchronization_LockReadUpgradable_" data-uid="IPA.Utilities.Async.Synchronization.LockReadUpgradable*"></a>
  381. <h4 id="IPA_Utilities_Async_Synchronization_LockReadUpgradable_System_Threading_ReaderWriterLockSlim_" data-uid="IPA.Utilities.Async.Synchronization.LockReadUpgradable(System.Threading.ReaderWriterLockSlim)">LockReadUpgradable(ReaderWriterLockSlim)</h4>
  382. <div class="markdown level1 summary"><p>Creates a locker for an upgradable read lock on a <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.readerwriterlockslim">ReaderWriterLockSlim</a>.</p>
  383. </div>
  384. <div class="markdown level1 conceptual"></div>
  385. <h5 class="decalaration">Declaration</h5>
  386. <div class="codewrapper">
  387. <pre><code class="lang-csharp hljs">public static Synchronization.ReaderWriterLockSlimUpgradableReadLocker LockReadUpgradable(ReaderWriterLockSlim rwl)</code></pre>
  388. </div>
  389. <h5 class="parameters">Parameters</h5>
  390. <table class="table table-bordered table-striped table-condensed">
  391. <thead>
  392. <tr>
  393. <th>Type</th>
  394. <th>Name</th>
  395. <th>Description</th>
  396. </tr>
  397. </thead>
  398. <tbody>
  399. <tr>
  400. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.readerwriterlockslim">ReaderWriterLockSlim</a></td>
  401. <td><span class="parametername">rwl</span></td>
  402. <td><p>the lock to acquire in upgradable read mode</p>
  403. </td>
  404. </tr>
  405. </tbody>
  406. </table>
  407. <h5 class="returns">Returns</h5>
  408. <table class="table table-bordered table-striped table-condensed">
  409. <thead>
  410. <tr>
  411. <th>Type</th>
  412. <th>Description</th>
  413. </tr>
  414. </thead>
  415. <tbody>
  416. <tr>
  417. <td><a class="xref" href="IPA.Utilities.Async.Synchronization.ReaderWriterLockSlimUpgradableReadLocker.html">Synchronization.ReaderWriterLockSlimUpgradableReadLocker</a></td>
  418. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  419. </td>
  420. </tr>
  421. </tbody>
  422. </table>
  423. <span class="small pull-right mobile-hide">
  424. <span class="divider">|</span>
  425. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/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>
  426. </span>
  427. <span class="small pull-right mobile-hide">
  428. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/9705692cbf53e5b1f7667f378696cf6ea482054b/IPA.Loader/Utilities/Async/Synchronization.cs/#L211">View Source</a>
  429. </span>
  430. <a id="IPA_Utilities_Async_Synchronization_LockWrite_" data-uid="IPA.Utilities.Async.Synchronization.LockWrite*"></a>
  431. <h4 id="IPA_Utilities_Async_Synchronization_LockWrite_System_Threading_ReaderWriterLockSlim_" data-uid="IPA.Utilities.Async.Synchronization.LockWrite(System.Threading.ReaderWriterLockSlim)">LockWrite(ReaderWriterLockSlim)</h4>
  432. <div class="markdown level1 summary"><p>Creates a locker for a write lock <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.readerwriterlockslim">ReaderWriterLockSlim</a>.</p>
  433. </div>
  434. <div class="markdown level1 conceptual"></div>
  435. <h5 class="decalaration">Declaration</h5>
  436. <div class="codewrapper">
  437. <pre><code class="lang-csharp hljs">public static Synchronization.ReaderWriterLockSlimWriteLocker LockWrite(ReaderWriterLockSlim rwl)</code></pre>
  438. </div>
  439. <h5 class="parameters">Parameters</h5>
  440. <table class="table table-bordered table-striped table-condensed">
  441. <thead>
  442. <tr>
  443. <th>Type</th>
  444. <th>Name</th>
  445. <th>Description</th>
  446. </tr>
  447. </thead>
  448. <tbody>
  449. <tr>
  450. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.readerwriterlockslim">ReaderWriterLockSlim</a></td>
  451. <td><span class="parametername">rwl</span></td>
  452. <td><p>the lock to acquire in write mode</p>
  453. </td>
  454. </tr>
  455. </tbody>
  456. </table>
  457. <h5 class="returns">Returns</h5>
  458. <table class="table table-bordered table-striped table-condensed">
  459. <thead>
  460. <tr>
  461. <th>Type</th>
  462. <th>Description</th>
  463. </tr>
  464. </thead>
  465. <tbody>
  466. <tr>
  467. <td><a class="xref" href="IPA.Utilities.Async.Synchronization.ReaderWriterLockSlimWriteLocker.html">Synchronization.ReaderWriterLockSlimWriteLocker</a></td>
  468. <td><p>the locker to use with <span class="xref">langword_csharp_using</span></p>
  469. </td>
  470. </tr>
  471. </tbody>
  472. </table>
  473. </article>
  474. </div>
  475. <div class="hidden-sm col-md-2" role="complementary">
  476. <div class="sideaffix">
  477. <div class="contribution">
  478. <ul class="nav">
  479. <li>
  480. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/4.0.0-beta/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>
  481. </li>
  482. <li>
  483. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/9705692cbf53e5b1f7667f378696cf6ea482054b/IPA.Loader/Utilities/Async/Synchronization.cs/#L26" class="contribution-link">View Source</a>
  484. </li>
  485. </ul>
  486. </div>
  487. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  488. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  489. </nav>
  490. </div>
  491. </div>
  492. </div>
  493. </div>
  494. <footer>
  495. <div class="grad-bottom"></div>
  496. <div class="footer">
  497. <div class="container">
  498. <span class="pull-right">
  499. <a href="#top">Back to top</a>
  500. </span>
  501. <span>Generated by <strong>DocFX</strong></span>
  502. </div>
  503. </div>
  504. </footer>
  505. </div>
  506. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  507. <script type="text/javascript" src="../styles/docfx.js"></script>
  508. <script type="text/javascript" src="../styles/main.js"></script>
  509. </body>
  510. </html>