o nnha@s,ddlmZddlmZGdddeZdS)) annotations)RLockcs,eZdZdZfddZfddZZS) 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. cs&tt||||d|_t|_dSN)superr__init___Singleton__instancer_Singleton__rlock)clsnamebasesdct __class__B/usr/local/lib/python3.10/dist-packages/ansible/utils/singleton.pyrs zSingleton.__init__cst|jdur|jS|j$|jdur&tt|j|i||_Wd|jSWd|jS1s2wY|jSr)rr rr__call__)r argskwrrrrs    zSingleton.__call__)__name__ __module__ __qualname____doc__rr __classcell__rrrrr s rN) __future__r threadingrtyperrrrrs