From 00d72390ff277e7e0d80a3b3deca55757d444b43 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 29 Sep 2022 12:39:57 -0400 Subject: [PATCH] Common: Accept a lock in LockingIslandEventQueueDecorator's constructor --- .../cc/event_queue/locking_island_event_queue_decorator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/event_queue/locking_island_event_queue_decorator.py b/monkey/monkey_island/cc/event_queue/locking_island_event_queue_decorator.py index da20ef3b1..200f2f1d7 100644 --- a/monkey/monkey_island/cc/event_queue/locking_island_event_queue_decorator.py +++ b/monkey/monkey_island/cc/event_queue/locking_island_event_queue_decorator.py @@ -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):