-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
I envision the following three scenarios:
- default case: This is the way that it is right now. A new thread would be spawned for the task if there are more threads available; otherwise, the task would be queued.
- queued mode (e.g.,
task->flags & TPOOL_TASK_QUEUED): The task would be always queued unless there are no threads currently running in the pool, in which case a thread would be spawned for the task. - immediate exclusive mode (e.g.,
task->flags & TPOOL_TASK_IMMEDIATE): A new thread would be spawned for the task if there are more threads available; otherwise,tpool_submit()would returnEBUSY.
Flag names aren't set in stone yet. If the two constants that I used above are used, then TPOOL_TASK_QUEUED and TPOOL_TASK_IMMEDIATE will be mutually exclusive (if used together, tpool_submit would return EINVAL).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels