Common: Accept a lock in LockingIslandEventQueueDecorator's constructor

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

View File

@ -8,8 +8,8 @@ class LockingIslandEventQueueDecorator(IIslandEventQueue):
Makes an IIslandEventQueue thread-safe by locking publish()
"""
def __init__(self, island_event_queue: IIslandEventQueue):
self._lock = Lock()
def __init__(self, island_event_queue: IIslandEventQueue, lock: Lock):
self._lock = lock
self._island_event_queue = island_event_queue
def subscribe(self, topic: IslandEventTopic, subscriber: IslandEventSubscriber):