Skip to content

Commit

Permalink
Fix fetching of unpatched threading primitives (closes #258)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmalloc committed Apr 12, 2018
1 parent accfb34 commit dfbec0e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions logbook/concurrency.py
Expand Up @@ -28,10 +28,12 @@ def is_gevent_enabled():


if has_gevent:
from gevent._threading import (Lock as ThreadLock,
RLock as ThreadRLock,
get_ident as thread_get_ident,
local as thread_local)
from gevent.monkey import get_original as _get_original
Lock = _get_original('threading', 'Lock')
RLock = _get_original('threading', 'RLock')
get_ident = _get_original('threading', 'get_ident')
local = _get_original('threading', 'local')

from gevent.thread import get_ident as greenlet_get_ident
from gevent.local import local as greenlet_local
from gevent.lock import BoundedSemaphore
Expand Down

0 comments on commit dfbec0e

Please sign in to comment.