adaptivemd.ExecutionPlan

class adaptivemd.ExecutionPlan(generator)[source]

An wrap to turn python function into asynchronous execution

The function is executed on start and interrupted if you use yield {(list of )condition to continue}

To make writing of asynchronous code easy you can use this wrapper class. Usually you start by opening a scheduler that you submit tasks to. Then submit a first task or yield a condition to wait for. Once this is met the code will continue to execute and you can submit more tasks until finally you will close the scheduler

Parameters:generator (function) – the function (generator) to be used
__init__(generator)[source]
Parameters:generator (function) – the function (generator) to be used

Methods

__init__(generator)
param generator:
 the function (generator) to be used
trigger(scheduler)

Attributes

on_done Return a Condition that is True once the event is finished
__init__(generator)[source]
Parameters:generator (function) – the function (generator) to be used
on_done

Return a Condition that is True once the event is finished