Skip to content

Commit 5cf8ca4

Browse files
authored
Merge branch 'master' into dpa/fix-jet-send_connection_hdr
2 parents a18f0b9 + 231da28 commit 5cf8ca4

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

src/macros.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ completion. To wait for completion, prefix the call with [`@sync`](@ref), like :
333333
macro distributed(args...)
334334
na = length(args)
335335
if na==1
336+
reducer = identity
336337
loop = args[1]
337338
elseif na==2
338339
reducer = args[1]

src/managers.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ end
526526

527527
function manage(manager::LocalManager, id::Integer, config::WorkerConfig, op::Symbol)
528528
if op === :interrupt
529-
kill(config.process, 2)
529+
kill(config.process::Process, 2)
530530
end
531531
end
532532

@@ -749,21 +749,22 @@ function kill(manager::LocalManager, pid::Int, config::WorkerConfig; profile_wai
749749
sleep(exit_timeout)
750750

751751
# Check to see if our child exited, and if not, send an actual kill signal
752-
if !process_exited(config.process)
752+
process = config.process::Process
753+
if !process_exited(process)
753754
@warn "Failed to gracefully kill worker $(pid)"
754755
profile_sig = Sys.iswindows() ? nothing : Sys.isbsd() ? ("SIGINFO", 29) : ("SIGUSR1" , 10)
755756
if profile_sig !== nothing
756757
@warn("Sending profile $(profile_sig[1]) to worker $(pid)")
757-
kill(config.process, profile_sig[2])
758+
kill(process, profile_sig[2])
758759
sleep(profile_wait)
759760
end
760761
@warn("Sending SIGQUIT to worker $(pid)")
761-
kill(config.process, Base.SIGQUIT)
762+
kill(process, Base.SIGQUIT)
762763

763764
sleep(term_timeout)
764-
if !process_exited(config.process)
765+
if !process_exited(process)
765766
@warn("Worker $(pid) ignored SIGQUIT, sending SIGKILL")
766-
kill(config.process, Base.SIGKILL)
767+
kill(process, Base.SIGKILL)
767768
end
768769
end
769770
end

src/process_messages.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function run_work_thunk(thunk::Function, print_error::Bool)
7575
end
7676
return result
7777
end
78-
function run_work_thunk(rv::RemoteValue, thunk)
78+
function run_work_thunk_remotevalue(rv::RemoteValue, thunk)
7979
put!(rv, run_work_thunk(thunk, false))
8080
nothing
8181
end
@@ -85,7 +85,7 @@ function schedule_call(rid, thunk)
8585
rv = RemoteValue(def_rv_channel())
8686
(PGRP::ProcessGroup).refs[rid] = rv
8787
push!(rv.clientset, rid.whence)
88-
errormonitor(@async run_work_thunk(rv, thunk))
88+
errormonitor(@async run_work_thunk_remotevalue(rv, thunk))
8989
return rv
9090
end
9191
end

src/workerpool.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ julia> default_worker_pool()
288288
WorkerPool(Channel{Int64}(sz_max:9223372036854775807,sz_curr:3), Set([4, 2, 3]), RemoteChannel{Channel{Any}}(1, 1, 4))
289289
```
290290
"""
291-
function default_worker_pool()
291+
function default_worker_pool()::AbstractWorkerPool
292292
# On workers retrieve the default worker pool from the master when accessed
293293
# for the first time
294294
if _default_worker_pool[] === nothing
@@ -298,7 +298,7 @@ function default_worker_pool()
298298
_default_worker_pool[] = remotecall_fetch(()->default_worker_pool(), 1)
299299
end
300300
end
301-
return _default_worker_pool[]
301+
return _default_worker_pool[]::AbstractWorkerPool
302302
end
303303

304304
"""

0 commit comments

Comments
 (0)