java.lang.Object
cn.wjybxx.base.concurrent.ExecutorCoreUtils
该工具类用于实现代码复用
(主要涉及到取消令牌)
- 作者:
- wjybxx date - 2025/5/18
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static ICancelTokengetCancelToken(Object ctx, int options) 获取上下文中的取消令牌static booleaninEventLoop(Executor executor) 当时是否在事件循环线程static booleanisCancelRequested(Object ctx, int options) 获取上下文中的取消信号static booleanisInlinable(Executor e, int options) 判断是否可以不提交任务,而是立即执行static ITaskstatic ITasktoTask(Runnable action, ICancelToken cancelToken, int options) static ITask
-
构造器详细资料
-
ExecutorCoreUtils
public ExecutorCoreUtils()
-
-
方法详细资料
-
inEventLoop
当时是否在事件循环线程 -
getCancelToken
获取上下文中的取消令牌 -
isCancelRequested
获取上下文中的取消信号 -
isInlinable
判断是否可以不提交任务,而是立即执行 -
toTask
-
toTask
-
toTask
-