ltsopensource / light-task-scheduler

Distributed Scheduled Job Framework
Apache License 2.0
3.01k stars 1.15k forks source link

如何确保配置了多线程的taskTracker执行的有序性 #481

Open smallze opened 9 months ago

smallze commented 9 months ago

虽然知道不维护了,但项目中仍在使用,这就是开源的力量吧。目前有个需求,在不改变多线程的tasktracker的情况下,怎么确保taskList批量提交时,执行的有序性,也不能直接修改已有的多线程taskTracker。

我目前的做法是新建了一个jobclient和tasktracker(设置单线程),但这也做对系统开销是否太大了呢

Laity commented 8 months ago

开销肯定很大,除了重写tasktracker里RunnerPool的线程池,没嘛太好的办法。

Laity commented 8 months ago

在RunnerPool里用PriorityBlockingQueue代替SynchronousQueue