summaryrefslogtreecommitdiff
path: root/src/buildstream/_stream.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/_stream.py')
-rw-r--r--src/buildstream/_stream.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index 707d8c086..9a00ecdc0 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -101,7 +101,7 @@ class Stream:
self._interrupt_callback = interrupt_callback
self._notifier = self._scheduler._stream_notification_handler # Assign the schedulers notification handler
self._scheduler_running = False
- self._scheduler_terminated = False
+ self._terminated = False
self._suspended = False
# init()
@@ -1078,7 +1078,7 @@ class Stream:
#
@property
def terminated(self):
- return self._scheduler_terminated
+ return self._terminated
# terminate()
#
@@ -1087,6 +1087,7 @@ class Stream:
def terminate(self):
notification = Notification(NotificationType.TERMINATE)
self._notify(notification)
+ self._terminated = True
# quit()
#
@@ -1655,8 +1656,6 @@ class Stream:
self._ticker_callback()
elif notification.notification_type == NotificationType.RUNNING:
self._scheduler_running = not self._scheduler_running
- elif notification.notification_type == NotificationType.TERMINATED:
- self._scheduler_terminated = True
else:
raise StreamError("Unrecognised notification type received: {}".format(notification.notification_type))