How to check a channel is closed or not without reading it?
There’s no way to write a safe application where you need to know whether a channel is open without interacting with it. The best way to do what you’re wanting to do is with two channels — one for the work and one to indicate a desire to change state (as well as the completion … Read more