Print a message when waiting for jobs
This commit is contained in:
parent
54197cc70d
commit
c848e6ae97
|
@ -420,12 +420,20 @@ module Scheduler = struct
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
at_exit (fun () ->
|
at_exit (fun () ->
|
||||||
let pids =
|
let jobs =
|
||||||
Hashtbl.fold running ~init:[] ~f:(fun ~key:_ ~data:job acc -> job :: acc)
|
Hashtbl.fold running ~init:[] ~f:(fun ~key:_ ~data:job acc -> job :: acc)
|
||||||
in
|
in
|
||||||
List.iter pids ~f:(fun job ->
|
match jobs with
|
||||||
let _, status = Unix.waitpid [] job.pid in
|
| [] -> ()
|
||||||
process_done job status ~exiting:true))
|
| first :: others ->
|
||||||
|
Format.eprintf "\nWaiting for the following jobs to finish: %t@."
|
||||||
|
(fun ppf ->
|
||||||
|
Format.fprintf ppf "[@{<id>%d@}]" first.id;
|
||||||
|
List.iter others ~f:(fun job ->
|
||||||
|
Format.fprintf ppf ", [@{<id>%d@}]" job.id));
|
||||||
|
List.iter jobs ~f:(fun job ->
|
||||||
|
let _, status = Unix.waitpid [] job.pid in
|
||||||
|
process_done job status ~exiting:true))
|
||||||
|
|
||||||
let rec go_rec cwd log t =
|
let rec go_rec cwd log t =
|
||||||
match (repr t).state with
|
match (repr t).state with
|
||||||
|
|
Loading…
Reference in New Issue