OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
/
twisted
/
_threads
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/31/2022 06:22:38 AM
rwxr-xr-x
📄
__init__.py
570 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📁
__pycache__
-
03/31/2022 06:22:38 AM
rwxr-xr-x
📄
_convenience.py
969 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📄
_ithreads.py
1.77 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
_memory.py
1.63 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
_pool.py
2.34 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
_team.py
7.09 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
_threadworker.py
3.3 KB
09/08/2017 10:38:36 AM
rw-r--r--
📁
test
-
03/31/2022 06:22:38 AM
rwxr-xr-x
Editing: _convenience.py
Close
# -*- 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 __future__ import absolute_import, division, print_function from ._ithreads import AlreadyQuit class Quit(object): """ 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()