mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-05 19:00:33 -05:00
fixes
This commit is contained in:
parent
65fd89708e
commit
e8cc87f1f5
2 changed files with 5 additions and 2 deletions
|
|
@ -444,7 +444,7 @@ let await (fut : 'a t) : 'a =
|
|||
resume ~ls k (Ok ())
|
||||
| Error (exn, bt) ->
|
||||
(* fail continuation immediately *)
|
||||
resume ~ls k (Error (exn, bt))));
|
||||
k (Error (exn, bt))));
|
||||
};
|
||||
(* un-suspended: we should have a result! *)
|
||||
get_or_fail_exn fut
|
||||
|
|
|
|||
|
|
@ -130,7 +130,10 @@ let run_task_now_ (self : state) ~runner (w : worker_state) ~name ~ls task :
|
|||
schedule_task_ self w ~name ~ls:[||] task'
|
||||
in
|
||||
|
||||
let resume ~ls k r = schedule_task_ self (Some w) ~name ~ls (fun () -> k r) in
|
||||
let resume ~ls k r =
|
||||
let w = find_current_worker_ () in
|
||||
schedule_task_ self w ~name ~ls (fun () -> k r)
|
||||
in
|
||||
|
||||
(* run the task now, catching errors *)
|
||||
(try
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue