You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Persistence needs to use a read lock and a write lock to make access thread safe.
Any number of threads may read at one time (do I need to switch to concurrent hashmaps for this to be safe? I don't think so...), but only one thread may write at a time, and no thread may read while another is writing.
Over-simplified, but I think that should cover it.
The text was updated successfully, but these errors were encountered:
Hm- this still bears investigation. I don't think I'm using the read/write lock objects correctly, possibly at all- I think I'm just super locking everybody out of everything if anyone's doing anything, basically.
Not really performant, but I guess it's the safest thing for now, til I have time to get this truly sorted.
I think all I need is a write lock flag that I manage myself, and then an actual synchronized write lock- but I'm really going to need to dig into this, look at the code, make sure- see if I need to be using ConcurrentHashMaps anywhere I need to, etc.
It's a pretty big deal, so I'm going to just keep things safe for now and demote this issue.
Persistence needs to use a read lock and a write lock to make access thread safe.
Any number of threads may read at one time (do I need to switch to concurrent hashmaps for this to be safe? I don't think so...), but only one thread may write at a time, and no thread may read while another is writing.
Over-simplified, but I think that should cover it.
The text was updated successfully, but these errors were encountered: