Interface JobRunner
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
作业运行器函数式接口
该接口用于定义多线程环境下执行的作业任务
作为函数式接口,它可以使用Lambda表达式或方法引用来实现
主要用于MultiThreadRunner及其子类中,为每个线程分配具体的任务
- Author:
- Kerbores(kerbores@riemann.tech)
-
Method Summary
-
Method Details
-
run
void run(int index, int threads) 执行作业任务在多线程环境中,每个线程都会调用此方法来执行具体的任务
- Parameters:
index- 执行任务的线程索引,从0开始,在多线程环境下唯一标识当前线程threads- 总线程数,即任务将并行运行的线程数量
-