Table of Contents

Class: IProcessTemplate ./src/peak/running/interfaces.py

Object that is used to spawn a particular type of child process

Base Classes   
Interface
Methods   
spawn
  spawn 
spawn ( parentComponent )

Return proxy,stub pair after forking child process

In the parent process, this method returns proxy,None, where proxy is an IProcessProxy for the child process. The proxy object is given parentComponent as its component context.

In the child process, this method returns None,stub, where stub is the command that should be returned from the current command's run() method, in order to start up the child process.

Note that the parent component for a process template should usually be a new configuration root, so that the parent and child process do not share any components unintentionally. Example usage:

            template = SomeProcessTemplate(config.makeRoot())
            proxy, stub = template.spawn(self)
            if proxy is None:
                self.mainLoop.exitWith(stub)
            else:
                # ... do something with the proxy


Table of Contents

This document was automatically generated on Mon Jun 1 01:11:07 2020 by HappyDoc version 2.1