/usr/lib/python3/dist-packages/twisted/_threads
NameSizeModeActions
test/-0755rm
__pycache__/-0755rm
_convenience.py8940644editdlrm
_ithreads.py17410644editdlrm
_memory.py15930644editdlrm
_pool.py22680644editdlrm
_team.py71490644editdlrm
_threadworker.py32910644editdlrm
__init__.py5050644editdlrm
Edit: /usr/lib/python3/dist-packages/twisted/_threads/_convenience.py (894B)
# -*- test-case-name: twisted._threads.test.test_convenience -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Common functionality used within the implementation of various workers. """ from ._ithreads import AlreadyQuit class Quit: """ A flag representing whether a worker has been quit. @ivar isSet: Whether this flag is set. @type isSet: L{bool} """ def __init__(self): """ Create a L{Quit} un-set. """ self.isSet = False def set(self): """ Set the flag if it has not been set. @raise AlreadyQuit: If it has been set. """ self.check() self.isSet = True def check(self): """ Check if the flag has been set. @raise AlreadyQuit: If it has been set. """ if self.isSet: raise AlreadyQuit()