Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
b6787205
Commit
b6787205
authored
Apr 11, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue 63: monkey patch threading too, even if it's already imported. Patch by Shaun Lindsay.
parent
98da1619
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
gevent/monkey.py
gevent/monkey.py
+4
-2
No files found.
gevent/monkey.py
View file @
b6787205
...
...
@@ -104,10 +104,12 @@ def patch_thread(threading=True, _threading_local=True):
from
gevent.local
import
local
thread
.
_local
=
local
if
threading
:
if
noisy
and
'threading'
in
sys
.
modules
:
sys
.
stderr
.
write
(
"gevent.monkey's warning: 'threading' is already imported
\
n
\
n
"
)
threading
=
__import__
(
'threading'
)
threading
.
local
=
local
threading
.
_start_new_thread
=
green_thread
.
start_new_thread
threading
.
_allocate_lock
=
green_thread
.
allocate_lock
threading
.
Lock
=
green_thread
.
allocate_lock
threading
.
_get_ident
=
green_thread
.
get_ident
if
_threading_local
:
_threading_local
=
__import__
(
'_threading_local'
)
_threading_local
.
local
=
local
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment