Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] exception tracing with Threads
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-04-05 (13:55)
From: Ohad Rodeh <orodeh@c...>
Subject: [Caml-list] exception tracing with Threads
  I've just tried to use the exception tracing
mechanism for threads. Unfortunately, when using
threads this option is not enabled. 

For example: 

let _ = 
    let i=1 in
    let b=2 in 
    let c=3 in
    failwith "Sanity"

fails with the trace:
  Fatal error: uncaught exception Failure("Sanity")
  Raised at module Pervasives, character 1012
  Called from module Xx, character 68

While the equivalent program with threads:

let _ = 
  let _ = Thread.create (fun () -> 
    let i=1 in
    let b=2 in 
    let c=3 in
    failwith "Sanity"
  ) () in

  Thread.delay 4.0;

fails without a trace. 

Any ideas? 



To unsubscribe, mail  Archives: