forked from p15670423/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()
|
Makes an IIslandEventQueue thread-safe by locking publish()
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, island_event_queue: IIslandEventQueue):
|
def __init__(self, island_event_queue: IIslandEventQueue, lock: Lock):
|
||||||
self._lock = Lock()
|
self._lock = lock
|
||||||
self._island_event_queue = island_event_queue
|
self._island_event_queue = island_event_queue
|
||||||
|
|
||||||
def subscribe(self, topic: IslandEventTopic, subscriber: IslandEventSubscriber):
|
def subscribe(self, topic: IslandEventTopic, subscriber: IslandEventSubscriber):
|
||||||
|
|
Loading…
Reference in New Issue