[concurrency-interest] More Javadoc problems

cowwoc cowwoc at bbs.darktech.org
Fri Dec 19 16:30:05 EST 2014


On 19/12/2014 4:10 PM, Peter Levart wrote:
> If you want to change the exceptional OR nonexceptional outcome of 
> preceeding stage, then use handle() instead of whenComplete().

I can't.

If you handle() and attempt to re-throw the same exception, you will get:

     unreported exception Throwable; must be caught or declared to be thrown

I agree that whenComplete() is meant to act as a finally block (which 
removes the need to do this funky casting). What I don't like is that 
join() returns without waiting for the result of whenComplete(). If the 
case of a real try-finally block, the code after the block does not 
execute after finally completes. I am trying to implement the same 
behavior here.

What should I be doing instead?

Gili
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20141219/5d76cd17/attachment.html>


More information about the Concurrency-interest mailing list