From ddb8ad4440bebcc8e242edd79323c20ec4aa84eb Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sat, 25 Jan 2025 17:20:32 -0500 Subject: [PATCH] debug --- src/remotecall.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/remotecall.jl b/src/remotecall.jl index 644ff04..826ca85 100644 --- a/src/remotecall.jl +++ b/src/remotecall.jl @@ -667,11 +667,13 @@ All asynchronous remote calls return `Future`s and set the value to the return value of the call upon completion. """ function put!(r::Future, v) + println("put!($(repr(r)), $(repr(v))) on thread $(Threads.threadid())") if r.where == myid() rid = remoteref_id(r) rv = lookup_ref(rid) isready(rv) && error("Future can be set only once") @lock r.lock begin + println("lock acquired on thread $(Threads.threadid()) on worker $(myid())") put!(rv, v) # this notifies the tasks waiting on the channel in fetch set_future_cache(r, v) # set the cache before leaving the lock, so that the notified tasks already see it cached end @@ -691,6 +693,7 @@ function set_future_cache(r::Future, v) end function put_future(rid, v, caller) + println("put_future on thread $(Threads.threadid()) on worker $(myid())") rv = lookup_ref(rid) isready(rv) && error("Future can be set only once") put!(rv, v)