Class: cogen.core.events.Join
A operation for waiting on a coroutine.
Example:
@coroutine def coro_a(): return_value = yield events.Join(ref) @coroutine def coro_b(): yield "bla" raise StopIteration("some return value") ref = scheduler.add(coro_b) scheduler.add(coro_a)
This will pause the coroutine and resume it when the other coroutine (ref in the example) has died.
Constructor
__init__ (self, coro, **kws)
Methods
cleanup (self, sched, coro)
Remove the calling coro from the waiting list.
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 calling coroutine as a waiter in the coro we want to join. Also, doesn't keep the called active (we'll be activated back when the joined coro dies).
set_timeout (self, val)
Attributes
coro
Value of coro
<member 'coro' of 'Join' objects>
delta
Value of delta
<member 'delta' of 'TimedOperation' objects>
last_checkpoint
Value of last_checkpoint
<member 'last_checkpoint' of 'TimedOperation' objects>
prio
Value of prio
<member 'prio' of 'Operation' objects>
state
Value of state
<member 'state' of 'Operation' objects>
timeout
Value of timeout
<member 'timeout' of 'TimedOperation' objects>
weak_timeout
Value of weak_timeout
<member 'weak_timeout' of 'TimedOperation' objects>