pybitmessage.network.threads module

Threading primitives for the network package

class StoppableThread(name=None)[source]

Bases: threading.Thread

Base class for application threads with stopThread method

logger = <logging.Logger object>
name = None
stopThread()

Stop the thread

exception BusyError[source]

Bases: thread.error

Thread error raised when another connection holds the lock we are trying to acquire.

nonBlocking(*args, **kwds)[source]

A context manager which acquires given lock non-blocking and raises BusyError if failed to acquire.