From c6d10d24c1d45bc4dbbc53d83a1648e02a1d65c6 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 21 Feb 2026 03:18:15 -0500 Subject: [PATCH] Fix a JET error around matching methods for `push!(...)` (#173) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a forward-port of https://github.com/JuliaLang/Distributed.jl/pull/173 (https://github.com/JuliaLang/Distributed.jl/commit/b7c43b235a963d19ec1c5e5aa9b8a565b6e49c34). ``` ┌ @ Distributed /workpath/Distributed.jl/src/process_messages.jl:387 │ no matching method found `push!(::Nothing, ::Any)` (1/2 union split): Distributed.push!(default_worker_pool()::Union{Nothing, Distributed.AbstractWorkerPool}, w.id::Any) └──────────────────── ``` (cherry picked from commit b7c43b235a963d19ec1c5e5aa9b8a565b6e49c34) --- src/workerpool.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/workerpool.jl b/src/workerpool.jl index 6d03bc9..881e4bf 100644 --- a/src/workerpool.jl +++ b/src/workerpool.jl @@ -288,7 +288,7 @@ julia> default_worker_pool() WorkerPool(Channel{Int64}(sz_max:9223372036854775807,sz_curr:3), Set([4, 2, 3]), RemoteChannel{Channel{Any}}(1, 1, 4)) ``` """ -function default_worker_pool() +function default_worker_pool()::AbstractWorkerPool # On workers retrieve the default worker pool from the master when accessed # for the first time if _default_worker_pool[] === nothing @@ -298,7 +298,7 @@ function default_worker_pool() _default_worker_pool[] = remotecall_fetch(()->default_worker_pool(), 1) end end - return _default_worker_pool[] + return _default_worker_pool[]::AbstractWorkerPool end """