The code you provided doesn’t compile - wrong link? > On Jan 31, 2025, at 10:31 AM, Bruno Albuquerque <[email protected]> wrote: > > This seemed expected to me but I went ahead and created a Go implementation > (which might not be 100% correct so take it for what it will) and I was > surprised that the race detector did not really complain about anything. > > https://go.dev/play/p/R1alMCc-xN9 > > -Bruno > > > On Fri, Jan 31, 2025, 6:13 AM Robert Engels <[email protected] > <mailto:[email protected]>> wrote: >> Hi, >> >> Do you think it is possible to implement a stamped lock in Go >> https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/StampedLock.html >> ? >> >> It would seem that the Go race detector would always report the “optimistic >> read” mode as a data race? >> >> (The docs state for Java that the values can be wildly inconsistent when the >> optimistic read fails). >> >> Ideas on how to implement in Go? >> >> -- >> 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 [email protected] >> <mailto:[email protected]>. >> To view this discussion visit >> https://groups.google.com/d/msgid/golang-nuts/FBEB055A-2B84-4738-AE22-C22ABAC8C4A9%40ix.netcom.com >> >> <https://groups.google.com/d/msgid/golang-nuts/FBEB055A-2B84-4738-AE22-C22ABAC8C4A9%40ix.netcom.com?utm_medium=email&utm_source=footer>. > > > -- > 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 [email protected] > <mailto:[email protected]>. > To view this discussion visit > https://groups.google.com/d/msgid/golang-nuts/CAEd86Tyfr_sirVQ8mw1EOPQ0LB7BA8zP%2BVT9tKG7Po7uQtamJg%40mail.gmail.com > > <https://groups.google.com/d/msgid/golang-nuts/CAEd86Tyfr_sirVQ8mw1EOPQ0LB7BA8zP%2BVT9tKG7Po7uQtamJg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
-- 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 [email protected]. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/EA6DB9DC-BC8D-4B1D-ACE9-BF983D19BFFE%40ix.netcom.com.
