Skip to content

Instantly share code, notes, and snippets.

View tbrooks007's full-sized avatar
🎯
Focusing

tbrooks007 tbrooks007

🎯
Focusing
View GitHub Profile
import threading
# Based on tornado.ioloop.IOLoop.instance() approach.
# See https://github.com/facebook/tornado
class SingletonMixin(object):
__singleton_lock = threading.Lock()
__singleton_instance = None
@classmethod