mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-09-06 16:49:20 +00:00
deploy: ea497ea488
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
<div class="cover ">
|
||||
<h1 class="cover"><span>with</span><wbr></wbr><span><span>Acquire</span></span></h1>
|
||||
</div>
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">inline suspend </span><span class="token keyword">fun </span><span class="token operator"><</span><span class="token keyword"></span><a href="with-acquire.html">T</a><span class="token operator">> </span><a href="-smart-semaphore/-mutable/index.html">SmartSemaphore.Mutable</a><span class="token punctuation">.</span><a href="with-acquire.html"><span class="token function">withAcquire</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">permits<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">1</span><span class="token punctuation">, </span></span><span class="parameter ">action<span class="token operator">: </span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -> </span><span class="token keyword"></span><a href="with-acquire.html">T</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="with-acquire.html">T</a><span class="clearfix"><span class="floating-right">(<a href="https://github.com/InsanusMokrassar/MicroUtils/blob/master//coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/SmartSemaphore.kt#L149">source</a>)</span></span></div><p class="paragraph">Will call SmartSemaphore.Mutable.lock, then execute <a href="with-acquire.html">action</a> and return the result after SmartSemaphore.Mutable.unlock</p></div></div>
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">inline suspend </span><span class="token keyword">fun </span><span class="token operator"><</span><a href="with-acquire.html">T</a><span class="token operator">> </span><a href="-smart-semaphore/-mutable/index.html">SmartSemaphore.Mutable</a><span class="token punctuation">.</span><a href="with-acquire.html"><span class="token function">withAcquire</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">permits<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">1</span><span class="token punctuation">, </span></span><span class="parameter ">action<span class="token operator">: </span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -> </span><a href="with-acquire.html">T</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="with-acquire.html">T</a><span class="clearfix"><span class="floating-right">(<a href="https://github.com/InsanusMokrassar/MicroUtils/blob/master//coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/SmartSemaphore.kt#L149">source</a>)</span></span></div><p class="paragraph">Will call SmartSemaphore.Mutable.lock, then execute <a href="with-acquire.html">action</a> and return the result after SmartSemaphore.Mutable.unlock</p></div></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2024 Copyright</span><span
|
||||
|
Reference in New Issue
Block a user