mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-66285: Revert "fix forking in asyncio" (#99756)
This commit is contained in:
parent
b5b3904f05
commit
351842b46a
3 changed files with 0 additions and 109 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue