Package io.camunda.zeebe.scheduler
Class WorkStealingGroup
java.lang.Object
io.camunda.zeebe.scheduler.WorkStealingGroup
- All Implemented Interfaces:
TaskScheduler
Workstealing group maintains a queue per thread.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAttempts to acquire the next task to executevoidSubmit the task into the provided thread's queue
-
Constructor Details
-
WorkStealingGroup
public WorkStealingGroup(int numOfThreads)
-
-
Method Details
-
submit
Submit the task into the provided thread's queue- Parameters:
task- the task to submitthreadId- the id of the thread into which queue the task should be submitted
-
getNextTask
Attempts to acquire the next task to execute- Specified by:
getNextTaskin interfaceTaskScheduler- Returns:
- the acquired task or null if no task is available
-