Is there an out-of-the-box thread pool with multiple queues (that ensure serial processing of each queue)?

后端 未结 7 669
星月不相逢
星月不相逢 2020-12-16 11:22

Among all my tasks, I have some that must be processed serially (they can never run concurrently and they must be processed in order).

I achieved that creating a sep

相关标签:
7条回答
  • 2020-12-16 12:21

    What you need is not a special executor, but means to express dependencies between tasks. Instead of a group of tasks which must be executed serially, think of a task which, at the end of execution, sends a signal to the next task, thus starting its execution. So your task can be coded as an actor which waits for allowing signal to start execution. Consider Akka or any other actor library (e.g. mine df4j).

    0 讨论(0)
提交回复
热议问题