Skip to content

bpo-32842: Fixing epoll timeout logics#5675

Closed
YoSTEALTH wants to merge 1 commit into
python:masterfrom
YoSTEALTH:patch-1
Closed

bpo-32842: Fixing epoll timeout logics#5675
YoSTEALTH wants to merge 1 commit into
python:masterfrom
YoSTEALTH:patch-1

Conversation

@YoSTEALTH
Copy link
Copy Markdown
Contributor

@YoSTEALTH YoSTEALTH commented Feb 14, 2018

current

if timeout is None:
timeout = -1
elif timeout <= 0:
timeout = 0

changed

if timeout is None:
timeout = -1
elif timeout < -1:
timeout = 0

what if "timeout=-1" ?

  • currently it would result in being timeout=0

https://bugs.python.org/issue32842

# current
if timeout is None:
    timeout = -1
elif timeout <= 0:
    timeout = 0

# changed
if timeout is None:
    timeout = -1
elif timeout < -1:
    timeout = 0

what if "timeout=-1" ?
- currently it would result in being timeout=0
@YoSTEALTH
Copy link
Copy Markdown
Contributor Author

my confusion comes from epoll.poll(timeout=-1, maxevents=-1) has nothing to do with selectors.BaseSelector.select(timeout=None)

@YoSTEALTH YoSTEALTH closed this Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants