def __make_threadlocal(self): if self.__use_greenlets: return gevent_local() else: return threading.local()