diff --git a/monkey/monkey_island/cc/resources/utils/semaphores.py b/monkey/monkey_island/cc/resources/utils/semaphores.py index 4c9ef5ecc..006386487 100644 --- a/monkey/monkey_island/cc/resources/utils/semaphores.py +++ b/monkey/monkey_island/cc/resources/utils/semaphores.py @@ -1,3 +1,5 @@ +# TODO: Switch to threading.lock and test. Calling gevent.patch_all() is supposed to monkeypatch +# threading to be compatible with gevent/greenlets. from gevent.lock import BoundedSemaphore # Mutex avoids race condition between monkeys diff --git a/monkey/monkey_island/cc/services/reporting/report_generation_synchronisation.py b/monkey/monkey_island/cc/services/reporting/report_generation_synchronisation.py index 38f7ee9cb..66128bad2 100644 --- a/monkey/monkey_island/cc/services/reporting/report_generation_synchronisation.py +++ b/monkey/monkey_island/cc/services/reporting/report_generation_synchronisation.py @@ -1,5 +1,7 @@ import logging +# TODO: Switch to threading.lock and test. Calling gevent.patch_all() is supposed to monkeypatch +# threading to be compatible with gevent/greenlets. from gevent.lock import BoundedSemaphore logger = logging.getLogger(__name__) diff --git a/monkey/monkey_island/cc/services/zero_trust/monkey_findings/monkey_zt_finding_service.py b/monkey/monkey_island/cc/services/zero_trust/monkey_findings/monkey_zt_finding_service.py index 5428fe178..44ea485c8 100644 --- a/monkey/monkey_island/cc/services/zero_trust/monkey_findings/monkey_zt_finding_service.py +++ b/monkey/monkey_island/cc/services/zero_trust/monkey_findings/monkey_zt_finding_service.py @@ -1,6 +1,9 @@ from typing import List from bson import ObjectId + +# TODO: Switch to threading.lock and test. Calling gevent.patch_all() is supposed to monkeypatch +# threading to be compatible with gevent/greenlets. from gevent.lock import BoundedSemaphore from common.common_consts import zero_trust_consts