73
73
function terminate! (w:: Worker , from:: Symbol = :manual )
74
74
already_terminated = @atomicswap :monotonic w. terminated = true
75
75
if ! already_terminated
76
- @debug " terminating worker $(w. pid ) from $from "
76
+ @debug " terminating $(w) from $( from) "
77
77
end
78
78
wte = WorkerTerminatedException (w)
79
79
@lock w. lock begin
114
114
# Called when timeout_profile_wait is non-zero.
115
115
function trigger_profile (w:: Worker , timeout_profile_wait, from:: Symbol = :manual )
116
116
if ! Sys. iswindows ()
117
- @debug " sending profile request to worker $(w. pid ) from $from "
117
+ @debug " sending profile request to $(w) from $( from) "
118
118
if Sys. islinux ()
119
119
kill (w. process, 10 ) # SIGUSR1
120
120
elseif Sys. isbsd ()
@@ -233,7 +233,7 @@ function redirect_worker_output(io::IO, w::Worker, fn, proc, ev::Threads.Event)
233
233
end
234
234
end
235
235
catch e
236
- # @error "Error redirecting worker output $(w.pid) " exception=(e, catch_backtrace())
236
+ # @error "Error redirecting $(w) output " exception=(e, catch_backtrace())
237
237
terminate! (w, :redirect_worker_output )
238
238
e isa EOFError || e isa Base. IOError || rethrow ()
239
239
finally
@@ -252,13 +252,13 @@ function process_responses(w::Worker, ev::Threads.Event)
252
252
while isopen (w. socket) && ! w. terminated
253
253
# get the next Response from the worker
254
254
r = deserialize (w. socket)
255
- @assert r isa Response " Received invalid response from worker $(w. pid ) : $(r) "
256
- # println("Received response $(r) from worker $(w.pid )")
255
+ @assert r isa Response " Received invalid response from $(w) : $(r) "
256
+ # println("Received response $(r) from $(w)")
257
257
@lock lock begin
258
- @assert haskey (reqs, r. id) " Received response for unknown request $(r. id) from worker $(w. pid ) "
258
+ @assert haskey (reqs, r. id) " Received response for unknown request $(r. id) from $(w) "
259
259
# look up the Future for this request
260
260
fut = pop! (reqs, r. id)
261
- @assert ! isready (fut. value) " Received duplicate response for request $(r. id) from worker $(w. pid ) "
261
+ @assert ! isready (fut. value) " Received duplicate response for request $(r. id) from $(w) "
262
262
if r. error != = nothing
263
263
# this allows rethrowing the exception from the worker to the caller
264
264
close (fut. value, r. error)
@@ -268,7 +268,7 @@ function process_responses(w::Worker, ev::Threads.Event)
268
268
end
269
269
end
270
270
catch e
271
- # @error "Error processing responses from worker $(w.pid )" exception=(e, catch_backtrace())
271
+ # @error "Error processing responses from $(w)" exception=(e, catch_backtrace())
272
272
terminate! (w, :process_responses )
273
273
e isa EOFError || e isa Base. IOError || rethrow ()
274
274
end
0 commit comments