[go-nuts] How could we emulate condition variables using Go channels only?

2024-01-12 Thread Rochus Keller
Here is the full question with examples (though meanwhile closed as usual in recent times on stackoverflow, so answer here please): https://stackoverflow.com/questions/77802102/mutex-and-condition-variables-in-go-without-using-the-sync-package This is a conceptual question based on the duality

Re: [go-nuts] How could we emulate condition variables using Go channels only?

2024-01-12 Thread Rochus Keller
> Something like this? https://go.dev/play/p/_H3kFjprAGG No, sorry. The goal is to emulate a full monitor just with channels, as demonstrated in the referenced text (see the Stack example). The Mutex is likely correct, but the Signal has yet to pass the scrutinity of the folks here. -- You re