Fix for current_message while operating under AsyncIO#593
Fix for current_message while operating under AsyncIO#593Bogdanp merged 3 commits intoBogdanp:masterfrom
current_message while operating under AsyncIO#593Conversation
|
This looks good, thanks! One question, thouhg, because I haven't been keeping up with contextvars. Do you know if they play well with gevent? |
|
They play well with gevent, but you need pass it to greenlet.gr_context attribute |
Yeah, I read this, didn't dig crazy into the Full disclosure, I did have to modify the |
|
Looks like async_to_sync do not copyback contextvars. New test check contextvars copy into asyncio thread, but not back. I think copyback contextvars is needed cause It's not for that PR, but who knows :) |
You mean to have a thread modify an original |
Yes, if Right now we fix situation when changes in caller thread not reflected in asyncio thread, but we have other side - changes in asyncio should reflect caller thread. Of course i'm talking only about |
Gotcha -- but that wouldn't impact the
This sounds like net new direct functionality (versus an artifact of how the |
|
Hmm ... looks like a problem with the rabbitmq server in the CI for those unit tests that failed |
|
Thanks! |
Moved from
localstocontextvarsto address issues while running underAsyncIO.Fixes #586