oh nice. I like the hashing idea to pick a shard lock out of array...that way I don't have to stick locks on, and bloat, every node in the btree. I can just take the hash value modulo a the size of a fixed set of locks... Thanks Robert.
p.s. awl, thanks, yes... saw that. thank you. On Friday, March 14, 2025 at 4:29:46 AM UTC Robert Engels wrote: > I think it is easier to just hash and shard the data set the lock is > protecting - ie a lock per shard. > > On Mar 13, 2025, at 10:52 PM, atomly <ato...@gmail.com> wrote: > > > > On Thu, Mar 13, 2025 at 20:29 Jason E. Aten <j.e....@gmail.com> wrote: > >> Is there a common way to do sharded read-write locks now? >> I mean faster than sync.RWMutex. >> >> I tried https://github.com/jonhoo/drwmutex which is from quite a >> while back... >> > > Have you read the original thread that spawned this, you might find it > pretty informative if not: > > https://groups.google.com/g/golang-nuts/c/zt_CQssHw4M/m/TteNG44geaEJ?pli=1 > > > -awl > > -- > 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...@googlegroups.com. > To view this discussion visit > https://groups.google.com/d/msgid/golang-nuts/CAA_Y42wUOYwnaO0ZDyC2USCMsZqVQXGck9q%2Bfb8inWoxG01brA%40mail.gmail.com > > <https://groups.google.com/d/msgid/golang-nuts/CAA_Y42wUOYwnaO0ZDyC2USCMsZqVQXGck9q%2Bfb8inWoxG01brA%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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/08738a3e-2c94-4f52-8f49-16b287303c6bn%40googlegroups.com.