lighthouse.events

lighthouse.events.wait_on_any(*events, **kwargs)[source]

Helper method for waiting for any of the given threading events to be set.

The standard threading lib doesn’t include any mechanism for waiting on more than one event at a time so we have to monkey patch the events so that their set() and clear() methods fire a callback we can use to determine how a composite event should react.

lighthouse.events.wait_on_event(event, timeout=None)[source]

Waits on a single threading Event, with an optional timeout.

This is here for compatibility reasons as python 2 can’t reliably wait on an event without a timeout and python 3 doesn’t define a maxint.