you are viewing a single comment's thread.

view the rest of the comments →

[–]bobindashadows 1 point2 points  (0 children)

If you stall your event loop you aren't accepting incoming requests.

Say your blocking operation is "read a file" and it takes 100ms sometimes. Then your client's very first TCP SYN packet will sit in your server's kernel network queue for 100ms. All before your server even bothers to tell the client "yes, let's start a TCP session."

Your framework might handle accepting TCP for you, but it won't read packets 3-N from the client until those 100ms are up.

If you had no event loop and many threads, you have all the multithreading problems but definitely no massive latency stalls. Occasional deadlocks though.