Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _stopped(cls, task_id): # On completion remove it
name = cls._get_group(task_id()) # Convert task_id to task_no
if name in cls.instances:
instance = cls.instances[name]
barrier = instance.barrier
if barrier is not None:
barrier.trigger()
del cls.instances[name]
Cancellable._stopped(task_id())