
    Vha                    2    d dl mZ d dlmZ  G d de      Zy)    )annotations)RLockc                  ,     e Zd ZdZ fdZ fdZ xZS )	SingletonzMetaclass for classes that wish to implement Singleton
    functionality.  If an instance of the class exists, it's returned,
    otherwise a single instance is instantiated and returned.
    c                \    t         t        |   |||       d | _        t	               | _        y N)superr   __init___Singleton__instancer   _Singleton__rlock)clsnamebasesdct	__class__s       G/home/dcms/DCMS/lib/python3.12/site-packages/ansible/utils/singleton.pyr
   zSingleton.__init__   s&    i&tUC8g    c                    | j                   | j                   S | j                  5  | j                   t        t        |   |i || _         d d d        | j                   S # 1 sw Y   | j                   S xY wr   )r   r   r	   r   __call__)r   argskwr   s      r   r   zSingleton.__call__   sk    >>%>>![[ 	M~~%!&y#!?!L!L	M ~~		M ~~s   %AA3)__name__
__module____qualname____doc__r
   r   __classcell__)r   s   @r   r   r   	   s    
 r   r   N)
__future__r   	threadingr   typer    r   r   <module>r!      s    #  r   