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
if !self.fs.fs.exists(directory)? {
self.fs.fs.create_dir(directory)?;
}
Suppose I have a Vec<(&str, &vfspath)>, and I want to concurrently write the strings to the paths, which may or may not exist. Naively, one approach is to run create_dir_all on the paths' parents and then write out to each path. But doing that can race because thread A creates a common ancestor path between the check and the create call from thread B.
the relevant section of
create_dir_all
(https://github.com/manuel-woelker/rust-vfs/blob/master/src/path.rs#L228):Suppose I have a
Vec<(&str, &vfspath)>
, and I want to concurrently write the strings to the paths, which may or may not exist. Naively, one approach is to runcreate_dir_all
on the paths' parents and then write out to each path. But doing that can race because thread A creates a common ancestor path between the check and the create call from thread B.Sort of similar to rust-lang/rust#33707
The text was updated successfully, but these errors were encountered: