@classmethod
def instance(cls):
    """Return a global IOLoop instance."""
    if cls._instance is None:
        with cls._lock:
            if cls._instance is None:
                cls._instance = cls()
    return cls._instance
