| ▲ | CamouflagedKiwi 4 hours ago | |||||||
This feels like it should ideally be something public in the structs package so anyone can leverage it, not just a specially blessed internal thing for the sync package. | ||||||||
| ▲ | advisedwang 31 minutes ago | parent | next [-] | |||||||
It's not a specially blessed type. As the article says, anything that implements sync.Locker acts like this. | ||||||||
| ▲ | 0x696C6961 3 hours ago | parent | prev | next [-] | |||||||
https://github.com/golang/go/issues/70811 Go moves slowly | ||||||||
| ▲ | ape4 3 hours ago | parent | prev | next [-] | |||||||
I agree, its a nice piece of semantics to be added to a struct | ||||||||
| ▲ | wbl 3 hours ago | parent | prev [-] | |||||||
You can very easily define one yourself. | ||||||||
| ||||||||