This is a completely theoretical point, but I tried to wrap around this problem. Take for example the client. There is forkIOd for each connection, and one of them wants to exit the whole program (i.e. / exit). How to spread this information on other topics?
This is not a condition, but I assume that the threads are read from their respective threads, which are blocked. Since they stand idle until something is written for them, they cannot interrogate any "done" variable. So my first thought is unless doneposted.
I do not have a solution for any program, so anyone who provides solutions for any language is evaluated, but the real question is how to do this in Haskell.
source
share