o
    ¯b~  ã                   @   s"   d Z ddlmZ G dd„ dƒZdS )zI
Common functionality used within the implementation of various workers.
é   )ÚAlreadyQuitc                   @   s(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	ÚQuitz‚
    A flag representing whether a worker has been quit.

    @ivar isSet: Whether this flag is set.
    @type isSet: L{bool}
    c                 C   s
   d| _ dS )z*
        Create a L{Quit} un-set.
        FN)ÚisSet©Úself© r   ú?/usr/lib/python3/dist-packages/twisted/_threads/_convenience.pyÚ__init__   s   
zQuit.__init__c                 C   s   |   ¡  d| _dS )zg
        Set the flag if it has not been set.

        @raise AlreadyQuit: If it has been set.
        TN)Úcheckr   r   r   r   r   Úset   s   
zQuit.setc                 C   s   | j rtƒ ‚dS )zb
        Check if the flag has been set.

        @raise AlreadyQuit: If it has been set.
        N)r   r   r   r   r   r   r
   $   s   ÿz
Quit.checkN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   r   r
   r   r   r   r   r      s
    	r   N)r   Ú	_ithreadsr   r   r   r   r   r   Ú<module>   s   