diff options
author | Chandan Singh <csingh43@bloomberg.net> | 2019-10-21 14:38:07 +0100 |
---|---|---|
committer | Chandan Singh <csingh43@bloomberg.net> | 2019-12-23 15:39:17 +0000 |
commit | 05550426d4afe92854f7a53bc18f8b715dd04693 (patch) | |
tree | 00dd5f5c26cdab44c0e6f717b9d140cc07299ff4 | |
parent | 0a9a9c2b2837968dee09e7ab6519200f146db612 (diff) | |
download | buildstream-05550426d4afe92854f7a53bc18f8b715dd04693.tar.gz |
WIP: Enforce SafeChildWatcher
-rw-r--r-- | src/buildstream/_scheduler/scheduler.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buildstream/_scheduler/scheduler.py b/src/buildstream/_scheduler/scheduler.py index a45da82f9..ca7e9279c 100644 --- a/src/buildstream/_scheduler/scheduler.py +++ b/src/buildstream/_scheduler/scheduler.py @@ -171,6 +171,12 @@ class Scheduler: # Hold on to the queues to process self.queues = queues + # NOTE: Enforce use of `SafeChildWatcher` as we generally don't want + # background threads. + # In Python 3.8+, `ThreadedChildWatcher` is the default watcher, and + # not `SafeChildWatcher`. + asyncio.set_child_watcher(asyncio.SafeChildWatcher()) + # Ensure that we have a fresh new event loop, in case we want # to run another test in this thread. self.loop = asyncio.new_event_loop() |