Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

N threads, with N readers waiting for a message that will only come if the N+1 reader (still in the queue) gets a message first.


Thank you for humoring me. I had to sleep on it, but I can see it now. Seems like it would require a really bad design or more likely bad actors (remotes leaving dead sockets open), but it would definitely be possible.

The same scenarios would lead to resource exhaustion if the thread pool wasn't bounded.


But sure one must use an output queue, not synchronously wait for the consumer to consume a result?


The N + 1 readers are all reading different sockets, blocked.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: