fastcs.attributes.util#

Members

PredicateEvent

A wrapper of asyncio.Event that only triggers when a predicate is satisfied

class fastcs.attributes.util.PredicateEvent(_predicate: ~collections.abc.Callable[[~fastcs.datatypes.datatype.DType_T], bool], _event: ~asyncio.locks.Event = <factory>)[source]#

A wrapper of asyncio.Event that only triggers when a predicate is satisfied

set(value: DType_T) bool[source]#

Set the event if the predicate is satisfied by the value

Returns:

True if the predicate was satisfied and the event was set, else False

async wait()[source]#

Wait for the event to be set