Skip to content

fixed String_IO error for read_until#222

Merged
knipknap merged 1 commit into
knipknap:masterfrom
AK-Eyes:patch-2
Mar 8, 2023
Merged

fixed String_IO error for read_until#222
knipknap merged 1 commit into
knipknap:masterfrom
AK-Eyes:patch-2

Conversation

@AK-Eyes

@AK-Eyes AK-Eyes commented Mar 8, 2023

Copy link
Copy Markdown
Contributor

added: import selectors

added: from time import monotonic as _time

from cpython code, added:

poll/select have the advantage of not requiring any extra file descriptor, # contrarily to epoll/kqueue (also, they require a single syscall). if hasattr(selectors, 'PollSelector'):

_TelnetSelector = selectors.PollSelector

else:
_TelnetSelector = selectors.SelectSelector

in read_until function, changed cookedq to rawq

added: import selectors
added: from time import monotonic as _time
from cpython code, added:
# poll/select have the advantage of not requiring any extra file descriptor,
# contrarily to epoll/kqueue (also, they require a single syscall).
if hasattr(selectors, 'PollSelector'):
    _TelnetSelector = selectors.PollSelector
else:
    _TelnetSelector = selectors.SelectSelector

in read_until function, changed cookedq to rawq
@knipknap
knipknap merged commit 4158f1e into knipknap:master Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants