Skip to content

Commit

Permalink
Use procs() when initializing EAGER_CONTEXT
Browse files Browse the repository at this point in the history
Using `myid()` with `workers()` meant that when the context was initialized with
a single worker the processor list would be: `[OSProc(1), OSProc(1)]`. `procs()`
will always include PID 1 and any other workers, which is what we want.
  • Loading branch information
JamesWrigley committed Apr 11, 2024
1 parent 6bf21b3 commit 3b0a355
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sch/eager.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const EAGER_STATE = Ref{Union{ComputeState,Nothing}}(nothing)

function eager_context()
if EAGER_CONTEXT[] === nothing
EAGER_CONTEXT[] = Context([myid(),workers()...])
EAGER_CONTEXT[] = Context(procs())
end
return EAGER_CONTEXT[]
end
Expand Down

0 comments on commit 3b0a355

Please sign in to comment.