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
This is handy for logging, and safe because we know that either the task or the thread is running, but never both - so no locking is needed. But maybe confusing (it can't work for run-locals, or run_in_worker_process)?
What should current_task() return in a run_in_worker_thread function? Currently we effectively find the task-locals by looking up the current task, so the most naive way to make task-locals work would to make current_task() work and then task-locals would work for free. Is that good or bad?
The text was updated successfully, but these errors were encountered:
This is handy for logging, and safe because we know that either the task or the thread is running, but never both - so no locking is needed. But maybe confusing (it can't work for run-locals, or
run_in_worker_process
)?What should
current_task()
return in arun_in_worker_thread
function? Currently we effectively find the task-locals by looking up the current task, so the most naive way to make task-locals work would to makecurrent_task()
work and then task-locals would work for free. Is that good or bad?The text was updated successfully, but these errors were encountered: