Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ea067ebf
Commit
ea067ebf
authored
Jul 10, 2004
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In poll(), check connections for exceptional conditions
parent
a2d6de74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
Lib/asyncore.py
Lib/asyncore.py
+15
-0
No files found.
Lib/asyncore.py
View file @
ea067ebf
...
...
@@ -80,6 +80,14 @@ def write(obj):
except
:
obj
.
handle_error
()
def
_exception
(
obj
):
try
:
obj
.
handle_expt_event
()
except
ExitNow
:
raise
except
:
obj
.
handle_error
()
def
readwrite
(
obj
,
flags
):
try
:
if
flags
&
(
select
.
POLLIN
|
select
.
POLLPRI
):
...
...
@@ -99,6 +107,7 @@ def poll(timeout=0.0, map=None):
if
map
:
r
=
[];
w
=
[];
e
=
[]
for
fd
,
obj
in
map
.
items
():
e
.
append
(
fd
)
if
obj
.
readable
():
r
.
append
(
fd
)
if
obj
.
writable
():
...
...
@@ -126,6 +135,12 @@ def poll(timeout=0.0, map=None):
continue
write
(
obj
)
for
fd
in
e
:
obj
=
map
.
get
(
fd
)
if
obj
is
None
:
continue
_exception
(
obj
)
def
poll2
(
timeout
=
0.0
,
map
=
None
):
# Use the poll() support added to the select module in Python 2.0
if
map
is
None
:
...
...
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