Hacker News new | ask | show | jobs
by yxhuvud 4568 days ago
That can just as well be implemented by message passing, which can happen through a socket or whatever.
1 comments

And if both threads are doing a blocking read waiting for their message? Blocking locks, deadlocks, endless fun...

But wait, you don't use blocking-IO, you poll the sockets to see if there is data available, right? Do you realize what you are polling? (hint, it is global and mutable)