in src/dubbo/utils.py [0:0]
def set(event) -> bool:
"""
Attempt to set the event object.
:param event: Event object, you can use threading.Event or any other object that supports the set operation.
:type event: Any
:return: True if the event was set, False otherwise
(such as the event is invalid or does not support the set operation).
:rtype: bool
"""
if event is None:
return False
# If the event supports the set operation, set the event and return True
if hasattr(event, "set"):
event.set()
return True
# If the event is invalid or does not support the set operation, return False
return False