gpt4 book ai didi

java - asyncMode 是什么意思?

转载 作者:行者123 更新时间:2023-12-02 08:15:49 25 4
gpt4 key购买 nike

直接来自此javadoc :

This class provides adapt methods for Runnable and Callable, that maybe of use when mixing execution of ForkJoinTasks with other kinds oftasks. When all tasks are of this form, consider using a poolconstructed in asyncMode.

在此上下文中,asyncMode 的实际含义是什么?如何在 asyncMode 中构建池?

最佳答案

Javadocs 说:

asyncMode - if true, establishes local first-in-first-out scheduling mode for forked tasks that are never joined. This mode may be more appropriate than default locally stack-based mode in applications in which worker threads only process event-style asynchronous tasks. For default value, use false.

这是构造函数 http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ForkJoinPool.html#ForkJoinPool(int, java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory, java.lang.Thread.UncaughtExceptionHandler, boolean)

致以诚挚的问候。

关于java - asyncMode 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17868071/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com