>> defer goroutineRunning.Done()
This doesn't work. Each invocation of subscribe() has it's own
sync.WaitGroup. It's just used it appears to ensure that the enclosed
goroutine is running before subscribe() returns
--
You received this message because you are subscribed to the Google Groups
// I am not sure why this code sometimes deadlocks, but sometimes it
doesn't.
// Hopefully someone will have some suggestions
package main
// ??? sometimes deadlocks
import (
"fmt"
"sync"
"time"
)
type Button struct {
Clicked *sync.Cond
}
func main() {
button := Button{