diff options
author | Tom Pollard <tom.pollard@codethink.co.uk> | 2019-07-08 12:34:05 +0100 |
---|---|---|
committer | Tom Pollard <tom.pollard@codethink.co.uk> | 2019-08-06 14:54:14 +0100 |
commit | c2dafd2dc11af73838ae19e337f94687244f60cc (patch) | |
tree | dba1457447398f2c195e3de41eccea36df1abc5d | |
parent | 9b491a9e2f7ac60da0e0257841f44545475a194c (diff) | |
download | buildstream-c2dafd2dc11af73838ae19e337f94687244f60cc.tar.gz |
Some tweaks
-rw-r--r-- | src/buildstream/_stream.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py index 89d6539ea..afbeb2066 100644 --- a/src/buildstream/_stream.py +++ b/src/buildstream/_stream.py @@ -112,9 +112,6 @@ class Stream(): print("Kwargs: {}".format(list(kwargs.items()))) assert not self._subprocess - global notification_count - notification_count = 0 - mp_context = mp.get_context(method='fork') process_name = "stream-{}".format(func.__name__) print("launchinglaunching subprocess:", process_name) @@ -122,8 +119,10 @@ class Stream(): self._subprocess.start() # TODO connect signal handlers - while self._subprocess.exitcode is not: + while self._subprocess.exitcode is None: + # check every given time interval on subprocess state self._subprocess.join(0.1) + # if no exit code, go back to checking the message queue self._loop() print("Stopping loop...") |