ARM and thread interruption

Carlos Costa e Silva carlos at keysoft.pt
Mon Jun 28 23:27:42 PDT 2010


-----Original Message-----
From: Mike Clark [mailto:mclark at apache.org] 

[...SNIP...]
But then again ARM already behaves significantly
differently from traditional try/finally: Under ARM, an exception in
an ARM block is thrown in favor of an exception in the cleanup block.
This is the opposite of traditional try/finally, where an exception in
the finally will be thrown in favor of an exception in the try.  So I
am not sure if "different from traditional try/catch" is a major
strike against.

> Or am I missing something here (quite possible :) ?
[...SNIP...]
--------------------------

Turns out I _really_ was missing something. Or rather, two somethings...

First, and most important, was that the suppressed exception was thrown 
in localVar.close() inside the finally block instead of one thrown on 
the try block as would be the case in a "standard" try/(bugged)finally 
block[1].

Second mistake was thinking that you where advocating turning on the 
interrupt flag when an InterruptedException was thrown in the try block 
[which after finding the first mistake is obviously not the case here].


With this new light, this proposal seems much more reasonable. Thanks 
for the enlightenment and go ahead with restoring the interrupt flag :)

Carlos


[1] Note to self: next time read the proposal document with less 
pre-conceived notions so that I read is what's written not what's 
already in my head.




More information about the coin-dev mailing list