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
8bd6e622
Commit
8bd6e622
authored
Mar 22, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workaround windows disallowing three empty arguments to select.
parent
a06e2ff4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
gevent/select.py
gevent/select.py
+10
-2
No files found.
gevent/select.py
View file @
8bd6e622
...
...
@@ -4,6 +4,8 @@ Waiting for I/O completion.
"""
from
__future__
import
absolute_import
import
sys
from
gevent.event
import
Event
from
gevent.hub
import
get_hub
from
gevent.hub
import
sleep
as
_g_sleep
...
...
@@ -14,7 +16,13 @@ from gevent._util import copy_globals
from
gevent._util
import
_NONE
from
errno
import
EINTR
from
select
import
select
as
_original_select
if
sys
.
platform
.
startswith
(
'win32'
):
def
_original_select
(
_r
,
_w
,
_x
,
_t
):
# windows cant handle three empty lists, but we've always
# accepted that, so don't try the compliance check on windows
return
((),
(),
())
else
:
from
select
import
select
as
_original_select
try
:
from
select
import
poll
as
original_poll
...
...
@@ -128,6 +136,7 @@ def select(rlist, wlist, xlist, timeout=None): # pylint:disable=unused-argument
# (Because libev tends to just return them as ready...)
# We accept the *xlist* here even though we can't below because this is all about
# error handling.
sel_results
=
((),
(),
())
try
:
sel_results
=
_original_select
(
rlist
,
wlist
,
xlist
,
0
)
except
error
as
e
:
...
...
@@ -135,7 +144,6 @@ def select(rlist, wlist, xlist, timeout=None): # pylint:disable=unused-argument
if
enumber
!=
EINTR
:
# Ignore interrupted syscalls
raise
sel_results
=
((),
(),
())
if
sel_results
[
0
]
or
sel_results
[
1
]
or
sel_results
[
2
]:
# If we actually had stuff ready, go ahead and return it. No need
...
...
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