-
Notifications
You must be signed in to change notification settings - Fork 206
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
Remove blocking IO #1277
base: master
Are you sure you want to change the base?
Remove blocking IO #1277
Conversation
Doesn't this just pass the blocking part into the sender endpoint instead of the receiver? |
Also, this is from python's documentation:
As I understand this, the |
As per the documentation many details are system-dependent. |
There is no behavioural difference in send and sendall when it comes to blocking and waiting for kernel response. |
And no, the connection will be closed upon a read/write error which will occur if the buffer is full and no data is being read. |
Consider side A to be the client (program ran on a host machine), B to be the server (ios device) and P to be python process.
When we have B streaming the data to A over P and A doesn't want to read the packets from it's socket - the kernel will keep them in a buffer. And when it fills up, next time P receives a packet from B it will block on line 122 because the buffer of socket P->A is full. And pymobiledevice3 hangs altogether and doesn't receive new connections.
While this change breaks some use cases I think it is generally better to not block io operations if the kernel buffer is full.