Source

ocaml-core / base / core / extended / lib / extended_thread.ml

The branch 'bash' does not exist.
Full commit
open Core.Std

let safe_create f =
  Thread.create
    (fun () ->
       try
         f ()
       with e ->
         eprintf "In thread %i\n" (Thread.id (Thread.self ()));
         if Printexc.backtrace_status () then
           Printexc.print_backtrace stderr;
         prerr_endline (Exn.to_string e);
         exit 1)
    ()