-
Notifications
You must be signed in to change notification settings - Fork 267
Closed
Description
From #1322:
store.Mounted(lockslayerStorefor reading) →ReloadIfChanged(locksloadMut, irrelevant because there is no other concurrentReloadIfChanged) →Load(locks nothing, updates things liker.byid)- vs.
store.Layer(lockslayerStorefor reading →Get(locks nothing, reads things liker.byid)
The read lock is shared, right? So there is no exclusion of Load modifying the data structure vs. any other reader of the store AFAICT.
I just can’t see how calling ReloadIfChanged with a shared reader lock is supposed to work in this case. My initial guess is that it is not supported at all to use the same store from multiple goroutines, and each goroutine should have its own store — but that’s clearly not correct, store.GetStore carefully returns a pre-existing matching store instance for concurrent callers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels