Skip to content

Commit

Permalink
Throw error on exhausting available processors
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsamaroo committed Apr 6, 2020
1 parent 5add7f8 commit 4edc980
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/processor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function choose_processor(from_proc::OSProc, options, f, args)
end
end
@assert !isempty(from_proc.queue)
while true
for i in 1:length(from_proc.queue)
proc = popfirst!(from_proc.queue)
push!(from_proc.queue, proc)
if !all(x->iscompatible(proc, options, x), args)
Expand All @@ -109,6 +109,7 @@ function choose_processor(from_proc::OSProc, options, f, args)
return proc
end
end
@error "($(myid())) Exhausted all available processor types!" proctypes=options.proctypes procsavail=from_proc.queue
end
move(ctx, from_proc::OSProc, to_proc::OSProc, x) = x
execute!(proc::OSProc, f, args...) = f(args...)
Expand Down

0 comments on commit 4edc980

Please sign in to comment.