BotActionLock
机器人行动锁, 用于防止多个线程同时使用机器人与游戏交互, 造成错误
Attributes
attribute__slots__= ('name', 'when_locked')attributename= lock_nameattributewhen_locked= when_lockedFunctions
func__init__(self, lock_name, when_locked=None)Args: lock_name (str): 行动锁名
Args: lock_name (str): description when_locked (Callable[[], None] | None, optional): description. Defaults to None.
paramselfparamlock_namestrparamwhen_lockedCallable[[], None] | None= NoneReturns
Nonefunc__enter__(self)paramselfReturns
Nonefunc__exit__(self, *_)paramselfparam_= ()Returns
None