[Mono-bugs] [Bug 77208][Nor] Changed - in MS.Net 2.0, finally blocks are not interrupted by ThreadAbortExceptions

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed May 16 20:38:28 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by macite at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=77208

--- shadow/77208	2007-05-16 20:27:20.000000000 -0400
+++ shadow/77208.tmp.11373	2007-05-16 20:38:28.000000000 -0400
@@ -35,6 +35,38 @@
 -> runtime.
 
 ------- Additional Comments From macite at gmail.com  2007-05-16 20:27 -------
 Created an attachment (id=19244)
 Test code illustrating issue with Thread.Interrupt in relation to finally and catch blocks.
 
+
+------- Additional Comments From macite at gmail.com  2007-05-16 20:38 -------
+Finally blocks should not be interrupted by Thread.Abort or
+Thread.Interrupt. In addition to this catch blocks cannot be
+interrupted, but can be aborted.
+
+The attached Test Code illustrates this issue.
+
+On Windows with MS.NET, the code executes to the sleep outside of the
+finally, and catch, blocks. Output:
+
+  Before Interrupt
+  Before Sleep in Finally
+  After Sleep in Finally
+  Before Sleep in Catch
+  After Sleep in Catch
+  Before Sleep after Catch
+  Thread was interrupted from a waiting state.
+
+On Mono 1.2.2.1 (Mac OSX 10.4, MacBook Pro):
+
+  Before Interrupt
+  Before Sleep in Finally
+  Thread interrupted
+
+Commenting out the finally section results in the following output:
+
+  Before Interrupt
+  Before Sleep in Catch
+  Thread interrupted
+
+


More information about the mono-bugs mailing list