[External] : Re: StructuredTaskScope and Futures

Ron Pressler ron.pressler at oracle.com
Tue Jan 3 11:00:45 UTC 2023



> On 3 Jan 2023, at 10:31, Remi Forax <forax at univ-mlv.fr> wrote:
> 
> ----- Original Message -----
>> From: "Ron Pressler" <ron.pressler at oracle.com>
>> To: "loom-dev" <loom-dev at openjdk.org>
>> Sent: Tuesday, January 3, 2023 11:21:15 AM
>> Subject: StructuredTaskScope and Futures
> 
>> Hi.
> 
> Hi,
> happy new year,
> 

Happy new year!

>> 
>> A question to those of you who have been using StructuredTaskScope: Have you
>> ever used any method on the Future returned from fork other than resultNow and,
>> if so, when/why?
> 
> state() to know the result/cancellation/error and exceptionNow() to propagate/log the error messages.
> 


When do you need to know the state or exception on an individual task rather than rely on the policy to handle errors collectively before processing successful results? If you have a code example that would be helpful.

— Ron


More information about the loom-dev mailing list