ats_utilities.singleton.meta_thread module¶
- Module
- meta_thread.py
- Copyright
- Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> ats_utilities is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ats_utilities is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- Info
- Defined class ThreadSafeSingletonMeta with attribute(s) and method(s). Created API for auto-register singleton object.
-
class
ats_utilities.singleton.meta_thread.
ThreadSafeSingletonMeta
[source]¶ Bases:
type
Defined class ThreadSafeSingletonMeta with attribute(s) and method(s). Created API for auto-register singleton object. It defines:
attributes: __INSTANCES - class dictionary for collecting instances.__LOCK - thread lock object.methods: __call__ - check instance and setup instance.__str__ - str dunder method for ThreadSafeSingletonMeta.-
_ThreadSafeSingletonMeta__INSTANCES
= {}¶
-
_ThreadSafeSingletonMeta__LOCK
= <unlocked _thread.lock object>¶
-