Perhaps something like this: https://go.dev/play/p/wllkgRAtd4a
Disclaimer: not yet tested, probably contains bugs. Also, I strongly _disrecommend_ the use of condition variables, because they're too bug-prone. 🙃 On Friday, January 12, 2024 at 2:48:09 PM UTC-5 Rochus Keller wrote: > > 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 received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1425881c-9764-418b-941c-b464436cb479n%40googlegroups.com.