Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

VaderGirl13 tbrooks007

🎯
Focusing
  • North Bergen, NJ
View GitHub Profile
View singleton.py
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
You can’t perform that action at this time.