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
In the function worker_thread(), "local_work_queue" call reset() and then it's not NULL.
However, in the function submit(), this variable is always nullptr, so the tasks are pushed into global queue.
Why?
The text was updated successfully, but these errors were encountered:
My opinion: submit() is called in the main thread, but work_thread() is running in the sub-thread, so their thread_local variable "local_work_queue" are different.
Therefore, the condition if(local_work_queue) is always false.
In the function worker_thread(), "local_work_queue" call reset() and then it's not NULL.
However, in the function submit(), this variable is always nullptr, so the tasks are pushed into global queue.
Why?
The text was updated successfully, but these errors were encountered: