Function dochy_fs::history::save_history_file_nb[][src]

pub fn save_history_file_nb<F: FnOnce(FsResult<FileNameProps>) + Send + 'static>(
    history_info: &HistoryInfo,
    tag: Option<String>,
    root: &RootObject,
    callback: F
)
Expand description

calculates the diff from the latest save file(most of the time) and save the diff file. This is non-blocking. RootObject is cloned and saved. RootObject consists of some Arcs so the cloning costs nearly zero. This system employs Copy on Write strategy. Actual copy occurs when the memory managed by Arc is modified before the saving is finished using Arc::make_mut.

The saving process is synchronized. You can call this function multiple times and the save is processed one by one.