Re: RecursiveTask and asynchronous waiting for completion
On 01/12/2018 06:27 AM, Peter Veentjer via Concurrency-interest wrote:
> If has a RecursiveTask and on completion I need to take an action.
> However, I don't want to block the thread by calling task.join.
You could use CountedCompleter rather than RecursiveTask.
It provides simple and efficient but hard-to-use completion chaining.
Or recast as CompletableFuture, which was introduced in part because
CountedCompleters are hard to use.
> So how can one listen to the completion of a RecursiveTask and then take
> an action? So comparable like the CompletableFuture.thenApply.