forked from p34709852/monkey
Common: Accept a lock in LockingIslandEventQueueDecorator's constructor
This commit is contained in:
parent
3344300f84
commit
00d72390ff
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue