Constructor

Methods

Attributes

Class: cogen.core.events.Call

This will pause the current coroutine, add a new coro in the scheduler and resume the callee when it returns.

Usage:

result = yield events.Call(mycoro, args=(), kwargs={}, prio=priority.DEFAULT)
  • mycoro - the coroutine to add.
  • args, kwargs - params to call the coroutine with
  • if prio is set the new coroutine will be added in the top of the scheduler queue

See: Operation.

Constructor

__init__ (self, coro, args=None, kwargs=None, **kws)

Methods

finalize (self)

Called just before the Coroutine wrapper passes the operation back in the generator. Return value is the value actualy sent in the generator. Subclasses might overwrite this method and call it from the superclass.

process (self, sched, coro)

Add the called coro in the sched and set the calling coroutine as the caller in the called coro (the called coro will activate the calling coro when it dies).

Attributes

args

Value of args

<member 'args' of 'Call' objects>

coro

Value of coro

<member 'coro' of 'Call' objects>

kwargs

Value of kwargs

<member 'kwargs' of 'Call' objects>

prio

Value of prio

<member 'prio' of 'Operation' objects>

state

Value of state

<member 'state' of 'Operation' objects>