Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe make task-local storage work from run_in_worker_thread functions #178

Open
njsmith opened this issue May 28, 2017 · 0 comments
Open

Comments

@njsmith
Copy link
Member

njsmith commented May 28, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants