def threadsafe_generator(f):
    def g(*a, **kw):
        return threadsafe_iter(f(*a, **kw))
    return g
A decorator that takes a generator function and makes it thread-safe.
dataset/ETHPy150Open Sage-Bionetworks/synapsePythonClient/synapseclient/utils.py/threadsafe_generator