File "thread.cpython-37.pyc"
Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python37/lib64/python3.7/concurrent/futures/__pycache__/thread.cpython-37.pyc
File size: 5.3 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit
B
fA @ s d Z dZddlZddlmZ ddlZddlZddlZddlZddl Z e
Zdadd Z
ee
G dd d eZd
d ZG dd
d
ejZG dd dejZdS )zImplements ThreadPoolExecutor.z"Brian Quinlan (brian@sweetapp.com) N)_baseFc C sJ da tt } x| D ]\}}|d qW x| D ]\}}| q2W d S )NT) _shutdownlist_threads_queuesitemsputjoin)r tq r >/opt/alt/python37/lib64/python3.7/concurrent/futures/thread.py_python_exit! s r
c @ s e Zd Zdd Zdd ZdS ) _WorkItemc C s || _ || _|| _|| _d S )N)futurefnargskwargs)selfr r r r r r r __init__. s z_WorkItem.__init__c
C sf | j sd S y| j| j| j}W n2 tk
rT } z| j | d } W d d }~X Y nX | j | d S )N)r Zset_running_or_notify_cancelr r r
BaseException
set_exceptionZ
set_result)r resultexcr r r run4 s
z
_WorkItem.runN)__name__
__module____qualname__r r r r r r r - s r c C s |d k rPy|| W n: t k
rN tjjddd | }|d k rJ| d S X y`xZ|jdd}|d k rt| ~qT| }ts|d ks|jr|d k rd|_|d d S ~qTW W n$ t k
r tjjddd Y nX d S )NzException in initializer:T)exc_info)blockzException in worker) r r ZLOGGERZcritical_initializer_failedgetr r r )Zexecutor_referenceZ
work_queueinitializerinitargsZexecutor work_itemr r r _workerB s2
r$ c @ s e Zd ZdZdS )BrokenThreadPoolzR
Raised when a worker thread in a ThreadPoolExecutor failed initializing.
N)r r r __doc__r r r r r% f s r% c @ sZ e Zd Ze jZdddZdd Ze j
jje_dd Zd
d Z
dd
dZe j
jje_dS )ThreadPoolExecutorN r c C s |dkrt pdd }|dkr(td|dk r@t|s@td|| _t | _t | _
d| _d| _t
| _|p|d| | _|| _|| _dS ) a Initializes a new ThreadPoolExecutor instance.
Args:
max_workers: The maximum number of threads that can be used to
execute the given calls.
thread_name_prefix: An optional name prefix to give our threads.
initializer: A callable used to initialize worker threads.
initargs: A tuple of arguments to pass to the initializer.
N r z"max_workers must be greater than 0zinitializer must be a callableFzThreadPoolExecutor-%d)os cpu_count
ValueErrorcallable TypeError_max_workersqueueZSimpleQueue_work_queueset_threads_brokenr threadingZLock_shutdown_lock_counter_thread_name_prefix_initializer _initargs)r Zmax_workersZthread_name_prefixr! r"