On Sun, Dec 11, 2016 at 11:48 PM, <i...@liangsun.org> wrote: > > What about type embedding? If put a sync.Mutex in a struct, that struct can > not be embedded into another struct, right?
That turns out not to be the case. You can embed that struct in another struct. But then, of course, you can not simply copy that other struct. > So I guess it's better idea to use structs with pointer to mutex. It depends. Ian -- 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. For more options, visit https://groups.google.com/d/optout.