logoalt Hacker News

CamouflagedKiwitoday at 12:34 PM4 repliesview on HN

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.


Replies

advisedwangtoday at 3:57 PM

It's not a specially blessed type. As the article says, anything that implements sync.Locker acts like this.

ape4today at 1:56 PM

I agree, its a nice piece of semantics to be added to a struct

wbltoday at 1:33 PM

You can very easily define one yourself.

show 1 reply