类 ImmediateExecutor

java.lang.Object
cn.wjybxx.base.concurrent.ImmediateExecutor
所有已实现的接口:
IExecutor, Executor

public final class ImmediateExecutor extends Object implements IExecutor
作者:
wjybxx date - 2025/5/16
  • 字段详细资料

  • 方法详细资料

    • execute

      public void execute(Runnable command)
      从接口复制的说明: IExecutor
      在将来的某个时间执行给定的命令。 命令可以在新线程中执行,也可以在池线程中执行,或者在调用线程中执行,这由Executor实现决定。 Executor.execute(Runnable)
      指定者:
      execute 在接口中 Executor
      指定者:
      execute 在接口中 IExecutor
      参数:
      command - 要执行的任务,注意ITask类型
    • execute

      public void execute(Runnable command, int options)
      从接口复制的说明: IExecutor
      在将来的某个时间执行给定的命令。 命令可以在新线程中执行,也可以在池线程中执行,或者在调用线程中执行,这由Executor实现决定。 Executor.execute(Runnable)

      任务的调度特征值 1.Executor需要感知用户任务的一些属性,以实现更好的管理。 2.选项可参考TaskOptions。 3.该接口不应该测试任务的类型,应当以参数的options为准。

      指定者:
      execute 在接口中 IExecutor
      参数:
      command - 要执行的任务
      options - 任务的调度特征值,见TaskOptions