Repository navigation
Conversation
|
This looks nice. However, what happens if one call ...
# We generally don't want to inherit task locals here
asyncio.ensure_future(coro()).add_done_callback(callback)
...Right now, I see no way to detect such cases. Also, such behaviour makes the whole mechanism even more implicit and unpredictable. So I think, maybe I was too hastened to open #84... Maybe we should just state that task locals inherit from wherever the task was created unless Also, it would be nice to have a way to check if task locals are enabled ant not inherited. Right now, I use something like |
|
Yeah I was thinking about temporarily store the context at spawning, and only set it active on |
|
what about
Is it an option? |
|
Yes definitely! Please see update. |
|
Thx for reviewing and commenting. I'll merge this first and start a new issue for renaming/new package issue, because #84 was actually about managing the inherit behavior but not renaming. |
Don't passthrough task local to spawned tasks which are not immediately joined.
@AmatanHead please review if this works for #84