ddtrace/contrib/gevent/patch.py
def _replace(g_class, imap_class, imap_unordered_class):
    """
    Utility function that replace the gevent Greenlet class with the given one.
    """
    # replace the original Greenlet classes with the new one
    gevent.greenlet.Greenlet = g_class
    gevent.pool.IMap = imap_class
    gevent.pool.IMapUnordered = imap_unordered_class

    gevent.pool.Group.greenlet_class = g_class

    # replace gevent shortcuts
    gevent.Greenlet = gevent.greenlet.Greenlet
    gevent.spawn = gevent.greenlet.Greenlet.spawn
    gevent.spawn_later = gevent.greenlet.Greenlet.spawn_later

    Utility function that replace the gevent Greenlet class with the given one.
    
Utility function that replace the gevent Greenlet class with the given one.
Utility function that replace the gevent Greenlet class with the given one .
def _replace(g_class, imap_class, imap_unordered_class):
    gevent.greenlet.Greenlet = g_class
    gevent.pool.IMap = imap_class
    gevent.pool.IMapUnordered = imap_unordered_class
    gevent.pool.Group.greenlet_class = g_class
    gevent.Greenlet = gevent.greenlet.Greenlet
    gevent.spawn = gevent.greenlet.Greenlet.spawn
    gevent.spawn_later = gevent.greenlet.Greenlet.spawn_later
def _replace ( g_class , imap_class , imap_unordered_class ) : gevent . greenlet . Greenlet = g_class gevent . pool . IMap = imap_class gevent . pool . IMapUnordered = imap_unordered_class gevent . pool . Group . greenlet_class = g_class gevent . Greenlet = gevent . greenlet . Greenlet gevent . spawn = gevent . greenlet . Greenlet . spawn gevent . spawn_later = gevent . greenlet . Greenlet . spawn_later
Utility function that replace the gevent Greenlet class with the given one.
Utility function that replace the gevent Greenlet class with the given one .
"""
    Utility function that replace the gevent Greenlet class with the given one.
    """ # replace the original Greenlet classes with the new one # replace gevent shortcuts
g_class
imap_class
imap_unordered_class