Closed utterances-bot closed 1 month ago
In first example of client.py:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
while True: # This line is not required
sock.connect((host, port))
Is "non-blocking but the still synchronous approach is called I/O multiplexing" conflicted with your first diagram?
@pengbomuzzy You're right - the diagram is not correct. I/O multiplexing is a blocking approach. But it allows blocking on multiple resources simultaneously, without needing to use polling or multithreading.
Asynchronous programming. Blocking I/O and non-blocking I/O - Blog | luminousmen
In this post, we will be talking about networking blocking and non-blocking I/O in order to explain the concept of asynchronous programming
https://luminousmen.com/post/asynchronous-programming-blocking-and-non-blocking