Constructor

Class: cogen.core.events.WaitForSignal

The coroutine will resume when the same object is Signaled.

Eg:

value = yield events.WaitForSignal(
    name,
    timeout=None,
    weak_timeout=True,
    prio=priority.DEFAULT
)
  • name - a object to wait on, can use strings for this - string used to wait is equal to the string used to signal.
  • value - a object sent with the signal. See: Signal

See: TimedOperation.

Constructor

__init__ (self, name, **kws)

Methods

cleanup (self, sched, coro)

Remove this coro from the waiting for signal queue.

finalize (self)

process (self, sched, coro)

Add the calling coro in a waiting for signal queue.

set_timeout (self, val)

Attributes

coro

Value of coro

<member 'coro' of 'TimedOperation' objects>

delta

Value of delta

<member 'delta' of 'TimedOperation' objects>

last_checkpoint

Value of last_checkpoint

<member 'last_checkpoint' of 'TimedOperation' objects>

name

Value of name

<member 'name' of 'WaitForSignal' objects>

prio

Value of prio

<member 'prio' of 'Operation' objects>

result

Value of result

<member 'result' of 'WaitForSignal' 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>