From 9e479109da97fcc218f3d02052aedf5ab1e88e41 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Fri, 20 Dec 2024 16:11:10 +0100 Subject: [PATCH] Fix Julia 1.11.2 WorkspaceManager race condition (#3119) --- src/evaluation/WorkspaceManager.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evaluation/WorkspaceManager.jl b/src/evaluation/WorkspaceManager.jl index e9ff8869a..e98748d00 100644 --- a/src/evaluation/WorkspaceManager.jl +++ b/src/evaluation/WorkspaceManager.jl @@ -334,12 +334,12 @@ function get_workspace(session_notebook::SN; allow_creation::Bool=true)::Union{N get(active_workspaces, notebook.notebook_id, nothing) else get!(active_workspaces, notebook.notebook_id) do - Task(() -> make_workspace(session_notebook)) + 🌸 = Pluto.@asynclog make_workspace(session_notebook) + yield(); 🌸 end end isnothing(task) && return nothing - istaskstarted(task) || schedule(task) fetch(task) end get_workspace(workspace::Workspace; kwargs...)::Workspace = workspace