From a0fa593a5ccf872eb75e5b768095382857838200 Mon Sep 17 00:00:00 2001 From: zjwegert <60646897+zjwegert@users.noreply.github.com> Date: Fri, 24 May 2024 18:18:12 +1000 Subject: [PATCH] Avoid race conditions on mkpath --- src/Io.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Io.jl b/src/Io.jl index 02afc19e..7cb3912a 100644 --- a/src/Io.jl +++ b/src/Io.jl @@ -43,6 +43,7 @@ a set of JLD2 files corresponding to each part. function psave(dir::AbstractString, x) ranks = get_parts(x) i_am_main(ranks) && mkpath(dir) + fetch(ranks) arr = to_local_storage(x) map(ranks,arr) do id, arr filename = joinpath(dir,basename(dir)*"_$id.jdl2")