Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCPTransport: switch from select.select() to selectors #81

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

gbanasiak
Copy link
Contributor

Closes #78

@@ -14,7 +14,7 @@ def err_conn_refused(errex):


def err_send_inprogress(err):
return err in [errno.EINPROGRESS, errno.EAGAIN]
return err in [errno.EINPROGRESS, errno.EAGAIN, errno.ENOTCONN]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required to pass thespian/test/test_generators.py test on MacOS. selectors signal socket as ready to send yet [Errno 57] Socket is not connected error is raised when sending in _next_XMIT_2(). After a slight backoff, all works fine. From what I could tell looking at packet dumps, socket.send() was throwing this error after TCP connection was already established. What is special about this test is the use of global names combined with creation of multiple actors in quick succession.

Fun fact: This test was created after report from Rally lead developer in March 2017. Rally no longer uses global names. They were removed from Rally by Thespian lead developer in December 2017. :-)

@gbanasiak gbanasiak changed the title Switch from select.select() to selectors TCPTransport: switch from select.select() to selectors Dec 23, 2024
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.

select.select() does not support file descriptors > 1023
1 participant