[concurrency-interest] ForkJoinExecutor.invoke and ForkJoinTask.invoke
tim at peierls.net
Thu Dec 13 09:02:11 EST 2007
On Dec 13, 2007 7:32 AM, Doug Lea <dl at cs.oswego.edu> wrote:
> ...perhaps it would be less error-prone for FJP.invoke(task) to act like
> task.invoke() if caller is an FJ thread, and to have another method, say
> ForkJoinTask.invokeLater(task) that schedules for poolwide submission.
FJTask.invoke is really fork + join, but possibly more efficient. Renaming
it to forkJoin() would remove the potential confusion with FJP.invoke() and
flatten the learning curve a bit. Then FJPool.invoke could act like
FJTask.invoke[Later] when called in a non-FJ thread and like forkJoin when
called in an FJ thread.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest