File tree 2 files changed +2
-2
lines changed
snapshots/main-v4/simbot-commons/simbot-common-suspend-runner/love.forte.simbot.suspendrunner
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ <h1 class="cover"><span>Default</span><wbr><span>Async</span><wbr><span>Dispatch
121
121
</ div >
122
122
< div class ="platform-hinted with-platform-tabs " data-platform-hinted ="data-platform-hinted ">
123
123
< div class ="platform-bookmarks-row " data-toggle-list ="data-toggle-list "> < button class ="platform-bookmark " data-filterable-current =":simbot-commons:simbot-common-suspend-runner/jvmMain " data-filterable-set =":simbot-commons:simbot-common-suspend-runner/jvmMain " data-active ="" data-toggle =":simbot-commons:simbot-common-suspend-runner/jvmMain "> jvm</ button > </ div >
124
- < div class ="content sourceset-dependent-content " data-active ="" data-togglable =":simbot-commons:simbot-common-suspend-runner/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/dev/main/simbot-commons/simbot-common-suspend-runner/src/jvmMain/kotlin/love/forte/simbot/suspendrunner/BlockingRunner.kt#L432 "> 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@50a8d84f 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@50a8d84f 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@50a8d84f lang-kotlin "> simbot.runInAsync.dispatcher.keepAliveTime</ code > </ td > < td > < code class ="org.jetbrains.dokka.pages.commenttable@50a8d84f 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@50a8d84f 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@50a8d84f 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@50a8d84f 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@50a8d84f 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@50a8d84f 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@50a8d84f 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@50a8d84f 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@50a8d84f 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@50a8d84f 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 >
124
+ < div class ="content sourceset-dependent-content " data-active ="" data-togglable =":simbot-commons:simbot-common-suspend-runner/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/dev/main/simbot-commons/simbot-common-suspend-runner/src/jvmMain/kotlin/love/forte/simbot/suspendrunner/BlockingRunner.kt#L432 "> 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@20c87521 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@20c87521 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@20c87521 lang-kotlin "> simbot.runInAsync.dispatcher.keepAliveTime</ code > </ td > < td > < code class ="org.jetbrains.dokka.pages.commenttable@20c87521 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@20c87521 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@20c87521 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@20c87521 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@20c87521 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@20c87521 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@20c87521 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@20c87521 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@20c87521 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@20c87521 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 >
125
125
</ div >
126
126
< div class ="footer ">
127
127
< a href ="#content " id ="go-to-top-link " class ="footer--button footer--button_go-to-top "> </ a >
You can’t perform that action at this time.
0 commit comments