You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:31:03 UTC
[buildstream] 09/19: Psuedocode for subprocess context manager
This is an automated email from the ASF dual-hosted git repository.
not-in-ldap pushed a commit to branch phil/ui-split-refactor
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit e0561a73703dfbb0ec6c82bbdafc63ccea2997ad
Author: Phil Dawson <ph...@codethink.co.uk>
AuthorDate: Thu Jun 20 11:12:30 2019 +0100
Psuedocode for subprocess context manager
---
src/buildstream/_stream.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index 2d451c6..4a1edcf 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -1609,3 +1609,17 @@ class Stream():
# a new use-case arises.
#
raise TypeError("Stream objects should not be pickled.")
+
+ # TODO
+ # Causes the decorated method to be run in a subprocess
+ @contextmanager
+ def subprocessed(self, func, *args, **kwargs):
+ pass
+ # Set up event loop
+
+ # Start subprocessed work
+
+ # Run event loop. This event loop should exit once the
+ # subprocessed work has completed
+
+ # Return result of subprocessed function