Table of Contents

Class: taskFactory ./src/peak/events/event_threads.py

Wrap a generator function to return a new Task each time it's called

Usage:

        def someMethod(self, whatever):
            yield whatever; events.resume()
            # ...

        someMethod = events.taskFactory(someMethod)

Each time it's called, ob.someMethod(whatever) will return a new events.Task that executes the code of the someMethod function on the supplied parameter(s). Note that this may also be used in conjunction with binding.Make, e.g.:

        def aTask(self):
            yield self.something; events.resume()
            # ...

        aTask = binding.Make( events.taskFactory(aTask) )

In this case, ob.aTask will be an events.Task that runs the aTask method. This is often convenient to use with uponAssembly=True, so that the task is started as soon as the component is assembled.

Base Classes   
advice
Methods   
__call__
  __call__ 
__call__ (
        self,
        *__args,
        *__kw,
        )


Table of Contents

This document was automatically generated on Mon May 20 01:11:18 2019 by HappyDoc version 2.1