Skip to content

Commit 381f799

Browse files
committed
1 parent a0ff941 commit 381f799

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

snapshots/main-v4/simbot-commons/simbot-common-suspend-runner/love.forte.simbot.suspendrunner/-default-async-dispatcher-or-null.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ <h1 class="cover"><span>Default</span><wbr><span>Async</span><wbr><span>Dispatch
8989
</div>
9090
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
9191
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark" data-filterable-current=":simbot-commons:simbot-common-suspend-runner:dokkaHtmlPartial/jvmMain" data-filterable-set=":simbot-commons:simbot-common-suspend-runner:dokkaHtmlPartial/jvmMain" data-active="" data-toggle=":simbot-commons:simbot-common-suspend-runner:dokkaHtmlPartial/jvmMain">jvm</button></div>
92-
<div class="content sourceset-dependent-content" data-active="" data-togglable=":simbot-commons:simbot-common-suspend-runner:dokkaHtmlPartial/jvmMain"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="../../../simbot-commons/simbot-common-annotations/love.forte.simbot.annotations/-internal-simbot-a-p-i/index.html"><span class="token annotation builtin">InternalSimbotAPI</span></a></div></div><span class="token keyword">val </span><a href="-default-async-dispatcher-or-null.html">DefaultAsyncDispatcherOrNull</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a><span class="token operator">?</span><span class="clearfix"><span class="floating-right">(<a href="https://github.com/simple-robot/simpler-robot/tree/v4-dev/simbot-commons/simbot-common-suspend-runner/src//jvmMain/kotlin/love/forte/simbot/suspendrunner/BlockingRunner.kt#L429">source</a>)</span></span></div><p class="paragraph">使用在非协程环境下的异步API(例如 <a href="run-in-async.html">runInAsync</a> )中的默认调度器。 会在首次被获取的时候进行实例化。</p><p class="paragraph">默认情况下,<a href="-default-async-dispatcher-or-null.html">DefaultAsyncDispatcherOrNull</a> 等于 <code class="lang-kotlin">null</code>.</p><p class="paragraph">存在部分可配置内容:</p><table><thead><tr><th>属性</th><th>JVM参数</th><th>默认值</th></tr></thead><tbody><tr><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ThreadPoolExecutor.html#corePoolSize()">核心线程数</a></td><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">simbot.runInAsync.dispatcher.coreSize</code></td><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runtime.html#availableProcessors()">availableProcessors</a> / 2</td></tr><tr><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ThreadPoolExecutor.html#maximumPoolSize()">最大线程数</a></td><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">simbot.runInAsync.dispatcher.maxSize</code></td><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runtime.html#availableProcessors()">availableProcessors</a> * 4</td></tr><tr><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ThreadPoolExecutor.html#keepAliveTime()"> 维持时间</a>(毫秒)</td><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">simbot.runInAsync.dispatcher.keepAliveTime</code></td><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">60000</code></td></tr></tbody></table><p class="paragraph">除了提供调度器的使用,你也可以指定一个从 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/index.html">Dispatchers</a> 中存在的属性。使用如下JVM参数可以覆盖调度器的使用: <i>(参数值不区分大小写)</i></p><table><thead><tr><th>JVM参数</th><th>对应值</th><th>描述</th></tr></thead><tbody><tr><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">simbot.runInAsync.dispatcher=io</code></td><td><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-i-o.html">Dispatchers.IO</a></td><td>使用 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-i-o.html">Dispatchers.IO</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">simbot.runInAsync.dispatcher=default</code></td><td><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-default.html">Dispatchers.Default</a></td><td>使用 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-default.html">Dispatchers.Default</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">simbot.runInAsync.dispatcher=main</code></td><td><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-main.html">Dispatchers.Main</a></td><td>使用 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-main.html">Dispatchers.Main</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">simbot.runInAsync.dispatcher=unconfined</code></td><td><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-unconfined.html">Dispatchers.Unconfined</a></td><td>使用 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-unconfined.html">Dispatchers.Unconfined</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">simbot.runInAsync.dispatcher=forkJoinPool</code></td><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ForkJoinPool.html">ForkJoinPool</a></td><td>使用 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ForkJoinPool.html">ForkJoinPool</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">simbot.runInAsync.dispatcher=virtual</code></td><td><a href="-virtual-thread-dispatcher.html">VirtualThreadDispatcher</a></td><td>使用 <a href="-virtual-thread-dispatcher.html">VirtualThreadDispatcher</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">simbot.runInAsync.dispatcher=virtualOrIo</code></td><td><a href="-virtual-thread-dispatcher.html">VirtualThreadDispatcher</a> or <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-i-o.html">Dispatchers.IO</a> if virtual thread not supported.</td><td>使用 <a href="-virtual-thread-dispatcher.html">VirtualThreadDispatcher</a> 作为默认调度器,并在虚拟线程不支持的情况下退化为 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-i-o.html">Dispatchers.IO</a></td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">simbot.runInAsync.dispatcher=forkJoinPool</code></td><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ForkJoinPool.html">ForkJoinPool</a></td><td>使用 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ForkJoinPool.html">ForkJoinPool</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@197d3005 lang-kotlin">simbot.runInAsync.dispatcher=custom</code></td><td><a href="-custom-blocking-dispatcher-provider/index.html">CustomBlockingDispatcherProvider</a></td><td>(since 3.3.0) 通过 SPI 加载 <a href="-custom-blocking-dispatcher-provider/index.html">CustomBlockingDispatcherProvider</a> 并通过其构建 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a></td></tr></tbody></table></div> </div>
92+
<div class="content sourceset-dependent-content" data-active="" data-togglable=":simbot-commons:simbot-common-suspend-runner:dokkaHtmlPartial/jvmMain"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="../../../simbot-commons/simbot-common-annotations/love.forte.simbot.annotations/-internal-simbot-a-p-i/index.html"><span class="token annotation builtin">InternalSimbotAPI</span></a></div></div><span class="token keyword">val </span><a href="-default-async-dispatcher-or-null.html">DefaultAsyncDispatcherOrNull</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a><span class="token operator">?</span><span class="clearfix"><span class="floating-right">(<a href="https://github.com/simple-robot/simpler-robot/tree/v4-dev/simbot-commons/simbot-common-suspend-runner/src//jvmMain/kotlin/love/forte/simbot/suspendrunner/BlockingRunner.kt#L429">source</a>)</span></span></div><p class="paragraph">使用在非协程环境下的异步API(例如 <a href="run-in-async.html">runInAsync</a> )中的默认调度器。 会在首次被获取的时候进行实例化。</p><p class="paragraph">默认情况下,<a href="-default-async-dispatcher-or-null.html">DefaultAsyncDispatcherOrNull</a> 等于 <code class="lang-kotlin">null</code>.</p><p class="paragraph">存在部分可配置内容:</p><table><thead><tr><th>属性</th><th>JVM参数</th><th>默认值</th></tr></thead><tbody><tr><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ThreadPoolExecutor.html#corePoolSize()">核心线程数</a></td><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">simbot.runInAsync.dispatcher.coreSize</code></td><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runtime.html#availableProcessors()">availableProcessors</a> / 2</td></tr><tr><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ThreadPoolExecutor.html#maximumPoolSize()">最大线程数</a></td><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">simbot.runInAsync.dispatcher.maxSize</code></td><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runtime.html#availableProcessors()">availableProcessors</a> * 4</td></tr><tr><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ThreadPoolExecutor.html#keepAliveTime()"> 维持时间</a>(毫秒)</td><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">simbot.runInAsync.dispatcher.keepAliveTime</code></td><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">60000</code></td></tr></tbody></table><p class="paragraph">除了提供调度器的使用,你也可以指定一个从 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/index.html">Dispatchers</a> 中存在的属性。使用如下JVM参数可以覆盖调度器的使用: <i>(参数值不区分大小写)</i></p><table><thead><tr><th>JVM参数</th><th>对应值</th><th>描述</th></tr></thead><tbody><tr><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">simbot.runInAsync.dispatcher=io</code></td><td><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-i-o.html">Dispatchers.IO</a></td><td>使用 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-i-o.html">Dispatchers.IO</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">simbot.runInAsync.dispatcher=default</code></td><td><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-default.html">Dispatchers.Default</a></td><td>使用 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-default.html">Dispatchers.Default</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">simbot.runInAsync.dispatcher=main</code></td><td><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-main.html">Dispatchers.Main</a></td><td>使用 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-main.html">Dispatchers.Main</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">simbot.runInAsync.dispatcher=unconfined</code></td><td><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-unconfined.html">Dispatchers.Unconfined</a></td><td>使用 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-unconfined.html">Dispatchers.Unconfined</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">simbot.runInAsync.dispatcher=forkJoinPool</code></td><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ForkJoinPool.html">ForkJoinPool</a></td><td>使用 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ForkJoinPool.html">ForkJoinPool</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">simbot.runInAsync.dispatcher=virtual</code></td><td><a href="-virtual-thread-dispatcher.html">VirtualThreadDispatcher</a></td><td>使用 <a href="-virtual-thread-dispatcher.html">VirtualThreadDispatcher</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">simbot.runInAsync.dispatcher=virtualOrIo</code></td><td><a href="-virtual-thread-dispatcher.html">VirtualThreadDispatcher</a> or <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-i-o.html">Dispatchers.IO</a> if virtual thread not supported.</td><td>使用 <a href="-virtual-thread-dispatcher.html">VirtualThreadDispatcher</a> 作为默认调度器,并在虚拟线程不支持的情况下退化为 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-i-o.html">Dispatchers.IO</a></td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">simbot.runInAsync.dispatcher=forkJoinPool</code></td><td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ForkJoinPool.html">ForkJoinPool</a></td><td>使用 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ForkJoinPool.html">ForkJoinPool</a> 作为默认调度器.</td></tr><tr><td><code class="org.jetbrains.dokka.pages.commenttable@2205b435 lang-kotlin">simbot.runInAsync.dispatcher=custom</code></td><td><a href="-custom-blocking-dispatcher-provider/index.html">CustomBlockingDispatcherProvider</a></td><td>(since 3.3.0) 通过 SPI 加载 <a href="-custom-blocking-dispatcher-provider/index.html">CustomBlockingDispatcherProvider</a> 并通过其构建 <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a></td></tr></tbody></table></div> </div>
9393
</div>
9494
<div class="footer">
9595
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2021-2024 <a href="https://github.com/simple-robot">Simple Robot</a>. All rights reserved.</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>

0 commit comments

Comments
 (0)