Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #194: Made async_to_sync work inside a fork
sync_to_async was keeping a threadlocal for the main event loop that was invalid, but still present, after a process fork. This makes async_to_sync check for the PID for that parent loop as well as the mere presence of it, fixing this problem and letting it make a new loop in the subprocess.
- Loading branch information
1 parent
4ab9d8e
commit 66a6e68
Showing
2 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters