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
f6cc07cf
Commit
f6cc07cf
authored
Sep 19, 2001
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #461321: Support None as a timeout in poll2 and poll3.
parent
2777c021
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Lib/asyncore.py
Lib/asyncore.py
+6
-4
No files found.
Lib/asyncore.py
View file @
f6cc07cf
...
@@ -110,8 +110,9 @@ def poll2 (timeout=0.0, map=None):
...
@@ -110,8 +110,9 @@ def poll2 (timeout=0.0, map=None):
import
poll
import
poll
if
map
is
None
:
if
map
is
None
:
map
=
socket_map
map
=
socket_map
# timeout is in milliseconds
if
timeout
is
not
None
:
timeout
=
int
(
timeout
*
1000
)
# timeout is in milliseconds
timeout
=
int
(
timeout
*
1000
)
if
map
:
if
map
:
l
=
[]
l
=
[]
for
fd
,
obj
in
map
.
items
():
for
fd
,
obj
in
map
.
items
():
...
@@ -142,8 +143,9 @@ def poll3 (timeout=0.0, map=None):
...
@@ -142,8 +143,9 @@ def poll3 (timeout=0.0, map=None):
# Use the poll() support added to the select module in Python 2.0
# Use the poll() support added to the select module in Python 2.0
if
map
is
None
:
if
map
is
None
:
map
=
socket_map
map
=
socket_map
# timeout is in milliseconds
if
timeout
is
not
None
:
timeout
=
int
(
timeout
*
1000
)
# timeout is in milliseconds
timeout
=
int
(
timeout
*
1000
)
pollster
=
select
.
poll
()
pollster
=
select
.
poll
()
if
map
:
if
map
:
for
fd
,
obj
in
map
.
items
():
for
fd
,
obj
in
map
.
items
():
...
...
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