Skip to content

Asyncio and fork() does not mix #2910

Open
@kristjanvalur

Description

@kristjanvalur

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions