interaction.base.threading

DblEvent

class ding.interaction.base.threading.DblEvent(opened: bool = False)[source]
Overview:

A double event object, can open and close. Bases on 2 event objects

__init__(opened: bool = False)[source]
Overview:

Constructor of DblEvent

Arguments:
  • opened (bool): Initial status (True means open, False means close, default is False)

close()[source]
Overview:

Close this event

is_close() bool[source]
Overview:

Get if the event is closed

Returns:
  • opened (bool): The event is closed or not

is_open() bool[source]
Overview:

Get if the event is opened

Returns:
  • opened (bool): The event is opened or not

open()[source]
Overview:

Open this event

wait_for_close(timeout: Optional[float] = None)[source]
Overview:

Wait until the event is closed

Arguments:
  • timeout (Optional[float]): Waiting time out in seconds

wait_for_open(timeout: Optional[float] = None)[source]
Overview:

Wait until the event is opened

Arguments:
  • timeout (Optional[float]): Waiting time out in seconds