Skip to content
Snippets Groups Projects
Commit a4db1624 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

token

parent e9157f69
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@ from __future__ import print_function, absolute_import, division
import six
import logging
import heapq
from .typecheck import typed, Callable
logger = logging.getLogger(__name__)
......@@ -39,6 +41,7 @@ class CallableGroup(object):
self.gather = gather
self.swallow_exceptions = swallow_exceptions
@typed(None, Callable, bool)
def add(self, callable, oneshot=False):
"""
:param oneshot: if True, callable will be unregistered after single call
......
......@@ -82,7 +82,6 @@ class AcquirePIDLock(object):
else:
raise LockIsHeld(pid, True)
def __enter__(self):
try:
self._acquire()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment