forked from p15670423/monkey
Common: Accept a lock in LockingAgentEventQueueDecorator's constructor
This commit is contained in:
parent
91375cdff2
commit
3344300f84
|
@ -11,8 +11,8 @@ class LockingAgentEventQueueDecorator(IAgentEventQueue):
|
||||||
Makes an IAgentEventQueue thread-safe by locking publish()
|
Makes an IAgentEventQueue thread-safe by locking publish()
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, agent_event_queue: IAgentEventQueue):
|
def __init__(self, agent_event_queue: IAgentEventQueue, lock: Lock):
|
||||||
self._lock = Lock()
|
self._lock = lock
|
||||||
self._agent_event_queue = agent_event_queue
|
self._agent_event_queue = agent_event_queue
|
||||||
|
|
||||||
def subscribe_all_events(self, subscriber: AgentEventSubscriber):
|
def subscribe_all_events(self, subscriber: AgentEventSubscriber):
|
||||||
|
|
Loading…
Reference in New Issue