Common: Accept a lock in LockingAgentEventQueueDecorator's constructor

This commit is contained in:
Mike Salvatore 2022-09-29 12:39:17 -04:00
parent 91375cdff2
commit 3344300f84
1 changed files with 2 additions and 2 deletions

View File

@ -11,8 +11,8 @@ class LockingAgentEventQueueDecorator(IAgentEventQueue):
Makes an IAgentEventQueue thread-safe by locking publish()
"""
def __init__(self, agent_event_queue: IAgentEventQueue):
self._lock = Lock()
def __init__(self, agent_event_queue: IAgentEventQueue, lock: Lock):
self._lock = lock
self._agent_event_queue = agent_event_queue
def subscribe_all_events(self, subscriber: AgentEventSubscriber):