You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 return EBUSY.
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).
The text was updated successfully, but these errors were encountered:
I envision the following three scenarios:
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.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
andTPOOL_TASK_IMMEDIATE
will be mutually exclusive (if used together,tpool_submit
would returnEINVAL
).The text was updated successfully, but these errors were encountered: