Constructor

Class: cogen.core.events.Sleep

A operation to pausing the coroutine for a specified amount of time.

Usage:

yield events.Sleep(time_object)
  • time_object - a datetime or timedelta object, or a number of seconds
yield events.Sleep(timestamp=ts)
  • ts - a timestamp

Constructor

__init__ (self, val)

Methods

cleanup (self, sched, coro)

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)

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>

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>