GH-66285: Revert "fix forking in asyncio" (#99756)

This commit is contained in:
Kumar Aditya 2022-11-24 23:04:21 +05:30 committed by GitHub
parent b5b3904f05
commit 351842b46a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 109 deletions

View file

@ -17,7 +17,6 @@ import socket
import subprocess
import sys
import threading
import signal
from . import format_helpers
@ -666,14 +665,6 @@ class BaseDefaultEventLoopPolicy(AbstractEventLoopPolicy):
def __init__(self):
self._local = self._Local()
if hasattr(os, 'fork'):
def on_fork():
# Reset the loop and wakeupfd in the forked child process.
self._local = self._Local()
signal.set_wakeup_fd(-1)
os.register_at_fork(after_in_child=on_fork)
def get_event_loop(self):
"""Get the event loop for the current context.