Closed vbmithr closed 8 years ago
Can you provide an example that used to work with 113.33 and doesn't work with the development version?
On 20/07/2016 08:17, Jérémie Dimino wrote:
Can you provide an example that used to work with 113.33 and doesn't work with the development version?
https://github.com/vbmithr/virtu/blob/master/src/logobs.ml#L87
The handler here seems to never execute. I'm pretty sure this code use to run in the previous version.
Vincent
Could you provide a minimal example that work with 113.33 but not the development version?
On 20/07/2016 14:27, Jérémie Dimino wrote:
Could you provide a minimal example that work with 113.33 but not the development version?
I just re-tested. Actually the code is executed. What might have changed is that the log messages are not displayed anymore.
let () =
set_level `Error;
Signal.(handle terminating ~f:(fun _signal ->
error "Terminating";
Out_channel.(output_string stdout "Terminating.\n");
Core.Std.exit 0
)
);
never_returns @@ Scheduler.go ()
This prints correctly on stdout but no log is displayed.
Vincent
shouldn't it be Shutdown.exit 0
instead of Core.Std.exit 0
given that you are using async?
On 20/07/2016 15:32, Jérémie Dimino wrote:
shouldn't it be |Shutdown.exit 0| instead of |Core.Std.exit 0| given that you are using async?
Possibly. Should I use don't_wait_for @@ Shutdown.exit 0
then?
Edit: Ok, got it.
On the new Async working on 4.03.0, my code which was previously using Signal.handle terminating to do some effects is not working anymore, i.e. the code supposed to run on interruption and other termination case is not run anymore.