This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author asvetlov
Recipients asvetlov, hellysmile, yselivanov
Date 2022-03-23.20:57:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648069042.48.0.545137929578.issue34014@roundup.psfhosted.org>
In-reply-to
Content
contextvars and run_in_executor() cannot be used together with process executor.

asyncio.to_thread() runs with a copy of the current context.
Available since Python 3.9

https://docs.python.org/3/library/asyncio-task.html?highlight=to_thread#asyncio.to_thread
History
Date User Action Args
2022-03-23 20:57:22asvetlovsetrecipients: + asvetlov, yselivanov, hellysmile
2022-03-23 20:57:22asvetlovsetmessageid: <1648069042.48.0.545137929578.issue34014@roundup.psfhosted.org>
2022-03-23 20:57:22asvetlovlinkissue34014 messages
2022-03-23 20:57:22asvetlovcreate