接口 JobRunner

函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface JobRunner
作者:
Kerbores(kerbores@riemann.tech)
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    run(int index, int threads)
    使用指定的线程数运行任务
  • 方法详细资料

    • run

      void run(int index, int threads)
      使用指定的线程数运行任务
      参数:
      index - 执行任务的索引号这个索程在多线程环境下唯一标识任务
      threads - 线程数,即任务将并行运行的线程数量