Search code examples
multithreadingpython-2.6asyncsocket

socket.connect() blocks other threads?


If I issue multiple socket.connect() in different threads - would a single socket.connect() make the current thread to wait for an ACK response, or meanwhile another thread would be able to issue a socket.connect()?


Solution

  • These two options "current thread waits for an ACK" and "another thread would be able to connect" are not mutually exclusive. Both are true. That's the whole point of threads that one can continue while the other is blocked.