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
2e4508b7
Commit
2e4508b7
authored
May 18, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workaround the hangs in threading for Python 3.4 and re-enable it in the test matrix.
parent
3db30e93
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
.travis.yml
.travis.yml
+1
-0
gevent/threading.py
gevent/threading.py
+30
-0
No files found.
.travis.yml
View file @
2e4508b7
...
@@ -3,6 +3,7 @@ python:
...
@@ -3,6 +3,7 @@ python:
-
"
2.6"
-
"
2.6"
-
"
2.7"
-
"
2.7"
-
"
3.3"
-
"
3.3"
-
"
3.4"
-
"
pypy"
-
"
pypy"
script
:
script
:
-
if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then NWORKERS=4 PYTHON=pypy make travis_pypy; fi
-
if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then NWORKERS=4 PYTHON=pypy make travis_pypy; fi
...
...
gevent/threading.py
View file @
2e4508b7
...
@@ -44,3 +44,33 @@ if PYPY:
...
@@ -44,3 +44,33 @@ if PYPY:
k
,
v
=
__threading__
.
_active
.
items
()[
0
]
k
,
v
=
__threading__
.
_active
.
items
()[
0
]
del
__threading__
.
_active
[
k
]
del
__threading__
.
_active
[
k
]
__threading__
.
_active
[
_get_ident
()]
=
v
__threading__
.
_active
[
_get_ident
()]
=
v
import
sys
if
sys
.
version_info
[:
2
]
>=
(
3
,
4
):
# XXX: Issue 18808 breaks us on Python 3.4.
# Thread objects now expect a callback from the interpreter itself
# (threadmodule.c:release_sentinel). Because this never happens
# when a greenlet exits, join() and friends will block forever.
# The solution below involves capturing the greenlet when it is
# started and deferring the known broken methods to it.
class
Thread
(
__threading__
.
Thread
):
_greenlet
=
None
def
is_alive
(
self
):
return
bool
(
self
.
_greenlet
)
isAlive
=
is_alive
def
_set_tstate_lock
(
self
):
self
.
_greenlet
=
getcurrent
()
def
join
(
self
,
timeout
=
None
):
if
self
.
_greenlet
is
None
:
return
self
.
_greenlet
.
join
(
timeout
=
timeout
)
def
_wait_for_tstate_lock
(
self
,
*
args
,
**
kwargs
):
raise
NotImplementedError
()
__implements__
.
append
(
'Thread'
)
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