Skip to content
New issue

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

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

Already on GitHub? # to your account

Asyncio and fork() does not mix #2910

Open
kristjanvalur opened this issue Aug 24, 2023 · 0 comments
Open

Asyncio and fork() does not mix #2910

kristjanvalur opened this issue Aug 24, 2023 · 0 comments

Comments

@kristjanvalur
Copy link
Contributor

The asyncio ConnectionPool contains a lot of code, inherited from the synchronous part, which tries to play safe with sockets after a fork() call.

However, python asyncio and fork does not play well together at all:
python/cpython#66197

Basically, one should never fork a process with a running event loop. As such, the code comparing PIDs is not helping with anything for async.

I propose that these rudiments be removed from the async code for clarity and simplicity.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant