Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.189
Cant Read [ /etc/named.conf ]
8.1.31
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
twisted /
_threads /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
test
[ DIR ]
drwxr-xr-x
__init__.py
505
B
-rw-r--r--
_convenience.py
894
B
-rw-r--r--
_ithreads.py
1.7
KB
-rw-r--r--
_memory.py
1.56
KB
-rw-r--r--
_pool.py
2.21
KB
-rw-r--r--
_team.py
6.98
KB
-rw-r--r--
_threadworker.py
3.21
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : _pool.py
# -*- test-case-name: twisted._threads.test -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Top level thread pool interface, used to implement L{twisted.python.threadpool}. """ from queue import Queue from threading import Lock, Thread, local as LocalStorage from twisted.python.log import err from ._team import Team from ._threadworker import LockWorker, ThreadWorker def pool(currentLimit, threadFactory=Thread): """ Construct a L{Team} that spawns threads as a thread pool, with the given limiting function. @note: Future maintainers: while the public API for the eventual move to twisted.threads should look I{something} like this, and while this function is necessary to implement the API described by L{twisted.python.threadpool}, I am starting to think the idea of a hard upper limit on threadpool size is just bad (turning memory performance issues into correctness issues well before we run into memory pressure), and instead we should build something with reactor integration for slowly releasing idle threads when they're not needed and I{rate} limiting the creation of new threads rather than just hard-capping it. @param currentLimit: a callable that returns the current limit on the number of workers that the returned L{Team} should create; if it already has more workers than that value, no new workers will be created. @type currentLimit: 0-argument callable returning L{int} @param threadFactory: Factory that, when given a C{target} keyword argument, returns a L{threading.Thread} that will run that target. @type threadFactory: callable returning a L{threading.Thread} @return: a new L{Team}. """ def startThread(target): return threadFactory(target=target).start() def limitedWorkerCreator(): stats = team.statistics() if stats.busyWorkerCount + stats.idleWorkerCount >= currentLimit(): return None return ThreadWorker(startThread, Queue()) team = Team( coordinator=LockWorker(Lock(), LocalStorage()), createWorker=limitedWorkerCreator, logException=err, ) return team
Close