Module: cogen.core.events

Base events (coroutine operations) and coroutine exceptions.

Classes

AddCoro

A operator for adding a coroutine in the scheduler. Example:

Call

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

ConnectionClosed

Raised when the other peer has closed connection.

ConnectionError

Raised when a socket has a error flag (in epoll or select)

CoroutineException

This is used intenally to carry exception state in the poller and scheduler.

Join

A operation for waiting on a coroutine. Example:

Operation

All operations derive from this. This base class handles the priority flag.

OperationTimeout

Raised when the timeout for a operation expires. The exception message will be the operation

Signal

This will resume the coroutines that where paused with WaitForSignal.

Sleep

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

TimedOperation

Operations that have a timeout derive from this.

WaitForSignal

The coroutine will resume when the same object is Signaled.