HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/tqdm/__pycache__/_monitor.cpython-38.pyc
U

�{2\\�@s`ddlmZmZmZddlmZddlmZddlZddgZGdd�de	�Z
Gdd�de�ZdS)	�)�Event�Thread�current_thread)�time)�warnN�TMonitor�TqdmSynchronisationWarningc@seZdZdZdS)rzhtqdm multi-thread/-process errors which may cause incorrect nesting
    but otherwise no adverse effectsN)�__name__�
__module__�__qualname__�__doc__�r
r
�//usr/lib/python3/dist-packages/tqdm/_monitor.pyrsc@s@eZdZdZdZdZdd�Zdd�Zdd�Zd	d
�Z	dd�Z
dS)
ra^
    Monitoring thread for tqdm bars.
    Monitors if tqdm bars are taking too much time to display
    and readjusts miniters automatically if necessary.

    Parameters
    ----------
    tqdm_cls  : class
        tqdm class to use (can be core tqdm or a submodule).
    sleep_interval  : fload
        Time to sleep between monitoring checks.
    NcCsvt�|�d|_t�|_d|_||_||_tj	dk	r>tj	|_	nt
|_	tjdk	rXtj|_nt|_t�
|j�|��dS)NTr)r�__init__Zdaemonr�
was_killed�woken�tqdm_cls�sleep_intervalr�_timer�_event�atexit�register�exit�start)�selfrrr
r
rr s




zTMonitor.__init__cCs$|j��|t�k	r|��|��S�N)r�setr�join�report�rr
r
rr2s

z
TMonitor.exitcCsdd�|jj��D�S)NcSsg|]}t|d�r|�qS)Zstart_t)�hasattr)�.0�ir
r
r�
<listcomp>:s
�z*TMonitor.get_instances.<locals>.<listcomp>)rZ
_instances�copyrr
r
r�
get_instances8szTMonitor.get_instancesc	Cs�|��}||_|j�|j�|j��r*dS|j���||��}|��}|D]J}|j��rhW5QR�dS|j	dkrJ||j
|jkrJd|_	|jdd�qJ||��kr�t
dt�W5QRXqdS)N�T)ZnolockzOSet changed size during iteration (see https://github.com/tqdm/tqdm/issues/481))rrr�waitr�is_setrZget_lockr%ZminitersZlast_print_tZmaxintervalZrefreshrr)rZcur_tZ	instances�instancer
r
r�run>s,


���zTMonitor.runcCs|j��Sr)rr(rr
r
rrbszTMonitor.report)r	r
rrrrrrr%r*rr
r
r
rrs$)Z	threadingrrrr�warningsrr�__all__�RuntimeWarningrrr
r
r
r�<module>s