8000 bpo-35621: Support running subprocesses in asyncio when loop is executed in non-main thread by asvetlov · Pull Request #14344 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-35621: Support running subprocesses in asyncio when loop is executed in non-main thread #14344

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jun 30, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix dangling thread warnings in tests
  • Loading branch information
asvetlov committed Jun 24, 2019
commit 6912ec769b6abee0c974fab6e2dcfe803e7088e1
3 changes: 0 additions & 3 deletions Lib/asyncio/unix_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import threading
import warnings


from . import base_events
from . import base_subprocess
from . import constants
Expand Down Expand Up @@ -1295,8 +1294,6 @@ def _do_waitpid(self, loop, expected_pid, callback, args):
loop.call_soon_threadsafe(callback, pid, returncode, *args)

self._threads.pop(expected_pid)
import time
time.sleep(0.5)


class _UnixDefaultEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_asyncio/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ def setUp(self):
policy.set_child_watcher(watcher)

def tearDown(self):
super().setUp()
super().tearDown()
policy = asyncio.get_event_loop_policy()
watcher = policy.get_child_watcher()
policy.set_child_watcher(None)
Expand Down
0