summaryrefslogtreecommitdiff
path: root/src/duppy.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/duppy.ml')
-rw-r--r--src/duppy.ml12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/duppy.ml b/src/duppy.ml
index 5b28871..3f855fa 100644
--- a/src/duppy.ml
+++ b/src/duppy.ml
@@ -346,11 +346,15 @@ let queue ?log ?(priorities=fun _ -> true) s name =
end
in
let rec f () =
- try run (); f () with
- | Queue_processed -> f ()
- | Queue_stopped -> ()
+ begin
+ try run () with
+ | Queue_processed -> ()
+ end;
+ (f [@tailcall]) ()
in
- f ()
+ try
+ f ()
+ with Queue_stopped -> ()
module Async =
struct