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
Has the thread cancellation problem evolved ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-08-28 (14:35)
From: Brian Hurt <bhurt@j...>
Subject: Re: [Caml-list] Has the thread cancellation problem evolved ?
Gordon Henriksen wrote:

> Such problems are too common to ignore. .NET defuses them by treating  
> ThreadAbortException specially.
> “When a call is made to the Abort method to destroy a thread, the  
> common language runtime throws a ThreadAbortException.  
> ThreadAbortException is a special exception that can be caught, but  
> it will automatically be raised again at the end of the catch block.  
> When this exception is raised, the runtime executes all the finally  
> blocks before ending the thread. Since the thread can do an unbounded  
> computation in the finally blocks, or call Thread.ResetAbort to  
> cancel the abort, there is no guarantee that the thread will ever end.”
> system.threading.threadabortexception.aspx

So what happens if I throw an infinite loop into an exception handler?