I know this topic comes up a bit and I’ve done a bit more research. 

Is a contributing reason that Go does not have re-entrant locks is that Go does 
not have any way to get Go routine identity? It seems you cannot write a 
reentrant lock - at least not with the typical syntax - without specialized 
runtime support. 

The only public way I can think of is something like

somelock.Lock(ctx)

But then you need to make every method accept a context.Context instance. 

-- 
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/69B98553-62B3-44BC-B3D9-B0001214139C%40ix.netcom.com.

Reply via email to