Constructor

Methods

Class: cogen.core.events.Signal

This will resume the coroutines that where paused with WaitForSignal.

Usage:

nr = yield events.Signal(
    name,
    value,
    prio=priority.DEFAULT
)
  • nr - the number of coroutines woken up
  • name - object that coroutines wait on, can be a string
  • value - object that the waiting coros recieve when they are resumed.

See: Operation.

Constructor

__init__ (self, name, value=None, recipients=0, **kws)

All the coroutines waiting for this object will be added back in the active coroutine queue.

Methods

finalize (self)

process (self, sched, coro)

If there aren't enough coroutines waiting for the signal as the recipicient param add the calling coro in another queue to be activated later, otherwise activate the waiting coroutines.

Attributes

coro

Value of coro

<member 'coro' of 'Signal' objects>

len

Value of len

<member 'len' of 'Signal' objects>

name

Value of name

<member 'name' of 'Signal' objects>

prio

Value of prio

<member 'prio' of 'Signal' objects>

recipients

Value of recipients

<member 'recipients' of 'Signal' objects>

result

Value of result

<member 'result' of 'Signal' objects>

state

Value of state

<member 'state' of 'Operation' objects>

value

Value of value

<member 'value' of 'Signal' objects>