Sindbad~EG File Manager
�
SԚg� � �� � d dl Z d dlZd dlZd dlZd dlmZmZ d dlZd dlZd dl Z d dl
mZ d dlm
Z
ej ej d� � Zd� Z G d� de� � Z G d � d
ej � � Z G d� de� � Z G d
� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � ZdS )� N)�start_new_thread�TIMEOUT_MAX)�support)�threading_helperz9platform doesn't support fork (no _at_fork_reinit method)c �4 � t j d| z � � d S )N�{�G�z�?)�time�sleep)�nthreads �,/usr/local/lib/python3.11/test/lock_tests.py�wait_threads_blockedr
s � � �J�u�w������� c �0 � e Zd Z dd�Zd� Zd� Zd� Zd� ZdS ) �BunchFc �l � || _ || _ g | _ g | _ g | _ | | _ d | _ d S �N)�funcr �started�finished�
exceptions� _can_exit�_wait_thread)�selfr r �wait_before_exits r �__init__zBunch.__init__! sD � � �
�� ���������
����-�-��� ����r c �
� t j � � }| j � |� � | � � � n1# t
$ r$}| j � |� � Y d }~nd }~ww xY w| j � |� � t j t j
� � D ]}| j r d S �
d S # | j � |� � t j t j
� � D ]}| j r w �w xY wr )� threading� get_identr �appendr �
BaseExceptionr r r �sleeping_retry�
SHORT_TIMEOUTr )r �tid�exc�_s r �taskz
Bunch.task/ s% � ��!�#�#������C� � � � ��I�I�K�K�K�K��� (� (� (��O�"�"�3�'�'�'�'�'�'�'�'����� (����
�M� � ��%�%�%��+�G�,A�B�B�
�
���>� ��E�E��
�
��
�M� � ��%�%�%��+�G�,A�B�B�
�
���>� ��E��
���s0 �A �B<