-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, read and write operations in FileStorage class are thread-safe. Before accessing the read or write methods, the thread acquires an intrinsic lock and releases the lock when the method returns. So, two threads cannot perfom a read or a write operation in parallel even if it is a different file.
To improve it, one possible solution is to implement a shared Lock using ReadWriteLock The read-lock prevents the acquisition of a write lock by another thread. More than one thread can read (and hold a read-lock simultaneously) at the same time. By contrast, a write lock prohibits all other operations while a write operation.
What do you think about it ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request