Browse thread
[Caml-list] Inter-thread exceptions
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Sven LUTHER <luther@d...> |
| Subject: | Re: [Caml-list] Inter-thread exceptions |
On Tue, Sep 03, 2002 at 04:48:51PM +0300, Lauri Alanko wrote: > Hello. > > How big a task would it be to implement asynchronous inter-thread > exceptions? In practice the feature would amount to a function: > > val raise_to : exn -> Thread.t -> unit > > This would be most handy for implementing eg. timeouts: just make a thread > that sleeps and raises an exception in the other thread when the time is > spent. > > The GHC folks and John Reppy have done some work on spelling out the > semantics of asynchronous exceptions in Haskell. Could this be used as a > base for a similar system in a strict and impure setting like ocaml? What > would be the main difficulties, both theoretically and implementation-wise? BTW, also it would be nice to have a (working) way to kill a thread. There is kill, but it does not seem to be implemented. Well, what i really want to do is to have a thread running a GUI, and have some events which will launch another thread doing some calculation, which may take a long time (or even tnot finish). So i thought having a button or something in the GUI handled by the main thread to kill the launched thread would come in handy, saddly, the kill function is not implemented. Friendly, Sven Luther ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners