super_hydro.contextsΒΆ

Various useful contexts.

Functions

coroutine(coroutine)

Decorator for a context that yeilds an function from a coroutine.

is_main_thread()

Return True if this is the main thread.

nointerrupt(f)

Decorator that suspends signals and passes an interrupted flag to the protected function.

Classes

CoroutineWrapper(coroutine)

Wrapper for coroutine contexts that allows them to function as a context but also as a function.

NoInterrupt([ignore])

Suspend the various signals during the execution block and a simple mechanism to allow threads to be interrupted.