Open dvyukov opened 11 years ago
The idea is as follows: Do GC-like scan of memory, but do not consider stacks of goroutines blocked on channels as roots. If a channel is marked as reachable, make all goroutines blocked on it as reachable and include their stacks into roots. At the end of the scan goroutines not marked as reachable are reported as dead. This can be extended to other synchronization primitives and timers (timer which Time chan is not reachable other than from the timer is dead).
Status changed to Accepted.