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] Native Threads
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-06 (11:12)
From: nadji@n...
Subject: [Caml-list] Native Threads

I've just been playing with threads and I noticed at execution
time that Thread.kill is not implemented by the posix-compiled
version of the library. I used this flag because I thought that
it would be faster (please correct me if I'm wrong), and there
was no mention that Thread.kill would not be implemented.
By looking at the sources, I learned that the reason is
"problems with cleanup handlers on several platforms".
That's fine with me, but I would like to compile my
program :)
So, would it be easy to add a flag to the byte code compiler
to say that we want the full thread library ?
Or, is there a workaround to simulate Thread.kill, without
modifying the (function running as a)thread to kill (it could
be doing a long system call) ?
Or, does someone knows how to implement a function
 timeout: float -> (unit->unit) -> unit
which executes the function given in argument , but
no more than a certain amount of time, without Thread.kill ?


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: