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 <[email protected]> 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
