-
Notifications
You must be signed in to change notification settings - Fork 436
Open
Labels
QuestionA question to be answered.A question to be answered.
Description
Hi! I don't understand why we need to wrap the core storage inside Arc<RwLock<>> (in MemStorage example). I do understand what Arc and RwLock do, locking and exclusive write access, etc, (so no need explanation), but why do we need an exclusive access? Doesn't each node have its own log storage? Or do nodes may access their log storage asynchronously from a several threads simultaneously?
#[derive(Clone, Default)]
pub struct MemStorage {
core: Arc<RwLock<MemStorageCore>>,
}Metadata
Metadata
Assignees
Labels
QuestionA question to be answered.A question to be answered.