https://github.com/JuliaLang/Distributed.jl/pull/122 demonstrates tests pass robustly now when multithreading, but it requires keeping `@async` as using `@spawn` is known to introduce races like #124 https://github.com/JuliaLang/Distributed.jl/pull/122#discussion_r1929661983 is a good contender for a place to start trying to fix thread safety properly.