[go-nuts] Busy synchronization wait seems to behave differently on 1.13 and 1.14

2020-07-25 Thread Groups Discussion
Hi all, writing a stress test case for one of my apps I noticed a very strange thing: my test case works well on go 1.14 but it doesn't work on go 1.13. I wrote a minimal reproducer https://play.golang.org/p/uHkKMINncUB to make it work on go 1.13 I have to add the sleep at line 41. In Go play

[go-nuts] Suggestions for dynamic per object lock

2020-04-04 Thread Groups Discussion
Hi all, while refactoring an old application I found this code: type concurrentChecks struct { mutexsync.Mutex activeChecks map[string]int } // addCheck waits until the processing for an item with the same token is finished func (c *concurrentChecks) addCheck(token string) { for { c.mut