OS : Linux
PHP Version : 7.4.33
Software : Apache/2.4.6 (CentOS) PHP/7.4.33
Information System : Linux apprendre2 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Disable Function : ó
iÝðXc @ sí d Z d d l Z d d l m Z d d l Z d d l Z d d l Z d d l Z y d d l m
Z
Wn e k
r‚ d „ Z
n Xd Z e j
ƒ Z e a d „ Z e j e ƒ d e f d „ ƒ YZ d
„ Z d e j f d „ ƒ YZ d S(
s Implements ThreadPoolExecutor.iÿÿÿÿN( t _base( t cpu_countc C s d S( N( t None( ( ( s= /usr/lib/python2.7/site-packages/concurrent/futures/thread.pyR s s" Brian Quinlan (brian@sweetapp.com)c C ss t a t r t t j ƒ ƒ n d } x! | D] \ } } | j d ƒ q+ Wx$ | D] \ } } | j t j ƒ qO Wd S( N( (
t Truet _shutdownt _threads_queuest listt itemst putR t joint syst maxint( R t tt q( ( s= /usr/lib/python2.7/site-packages/concurrent/futures/thread.pyt _python_exit' s t _WorkItemc B s e Z d „ Z d „ Z RS( c C s( | | _ | | _ | | _ | | _ d S( N( t futuret fnt argst kwargs( t selfR R R R ( ( s= /usr/lib/python2.7/site-packages/concurrent/futures/thread.pyt __init__3 s c C sv | j j ƒ s d Sy | j | j | j Ž } Wn0 t j ƒ d \ } } | j j | | ƒ n X| j j | ƒ d S( Ni ( R t set_running_or_notify_cancelR R R R
t exc_infot set_exception_infot
set_result( R t resultt et tb( ( s= /usr/lib/python2.7/site-packages/concurrent/futures/thread.pyt run9 s ( t __name__t
__module__R R ( ( ( s= /usr/lib/python2.7/site-packages/concurrent/futures/thread.pyR 2 s c C sž yz xs t rx | j d t ƒ } | d k r= | j ƒ ~ q n | ƒ } t sa | d k sa | j rr | j d ƒ d S~ q WWn t j j d d t ƒn Xd S( Nt blocks Exception in workerR ( R t getR R R R R t LOGGERt critical( t executor_referencet
work_queuet work_itemt executor( ( s= /usr/lib/python2.7/site-packages/concurrent/futures/thread.pyt _workerE s
t ThreadPoolExecutorc B sV e Z d d „ Z d „ Z e j j j e _ d „ Z e d „ Z
e j j
j e
_ RS( c C s} | d k r" t ƒ p d d } n | d k r= t d ƒ ‚ n | | _ t j ƒ | _ t ƒ | _ t | _
t j ƒ | _
d S( sº Initializes a new ThreadPoolExecutor instance.
Args:
max_workers: The maximum number of threads that can be used to
execute the given calls.
i i i s" max_workers must be greater than 0N( R R t
ValueErrort _max_workerst queuet Queuet _work_queuet sett _threadst FalseR t threadingt Lockt _shutdown_lock( R t max_workers( ( s= /usr/lib/python2.7/site-packages/concurrent/futures/thread.pyR ] s c O sk | j \ | j r" t d ƒ ‚ n t j ƒ } t | | | | ƒ } | j j | ƒ | j ƒ | SWd QXd S( Ns* cannot schedule new futures after shutdown( R4 R t RuntimeErrorR t FutureR R. R t _adjust_thread_count( R R R R t ft w( ( s= /usr/lib/python2.7/site-packages/concurrent/futures/thread.pyt submitq s
c C s‹ | j d „ } t | j ƒ | j k r‡ t j d t d t j | | ƒ | j f ƒ } t | _
| j ƒ | j j | ƒ | j t
|