Mini Shell
3
C��e9% � @ sL d dl Z d dlmZ ee�ZdZG dd� de�ZG dd� de j�Z e� Z
dS )� N)�get_module_loggerZAnaWorkerThreadc @ s� e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Zdd� Z
edd� �Zdd� Zdd� Zedd� �Zedd� �Zd d!� Zd"S )#�
ThreadManagera� A singleton class for managing threads and processes.
Notes:
THE INSTANCE HAS TO BE CREATED IN THE MAIN THREAD!
This manager makes one assumption that contradicts python's
threading module documentation. In this class, we assume that thread
names are unique and meaningful. This is an okay assumption for us
to make given that anaconda is only ever going to have a handful of
special purpose threads.
c C s$ i | _ tj� | _i | _tj� | _d S )N)�_objs� threading�RLock�
_objs_lock�_errors�_errors_lock)�self� r �!/usr/lib64/python3.6/threading.py�__init__* s
zThreadManager.__init__c C s | S )Nr )r
r r r �__call__0 s zThreadManager.__call__c
C sF | j �4 |j| jkr"td|j ��|| j|j<