[concurrency-interest] jsr166y reorganization and updates

Tim Peierls tim at peierls.net
Tue Jan 6 13:54:26 EST 2009


OK, thanks. I'll try playing with it to see if it still seems confusing.
--tim

On Tue, Jan 6, 2009 at 10:53 AM, Doug Lea <dl at cs.oswego.edu> wrote:

> Tim Peierls wrote:
>
>>
>> :-( Sorry to hear that.
>>
>
> Reasoning:
> ForkJoinPool implements ExecutorService method
>  invokeAll(Collection<Runnable>),
> ForkJoinTask implements the analogous form
>  invokeAll(Collection<ForkJoinTask>)
> and also the var-arg version
>  invokeAll(ForkJoinTask ...)
> which is further specialized to the two-task case
>  invokeAll(ForkJoinTask t1, ForkJoinTask t2)
> So the specialization for the one-task case would be
>  invokeAll(ForkJoinTask t)
> or the less odd-sounding
>  invoke(ForkJoinTask t)
> or using more standard OO conventions
>  t.invoke().
> which differs from
>  ForkJoinPool.invoke(ForkJoinTask t)
> in that t.invoke() always begins execution in the
> current thread, while FJP.invoke(t) might not (and
> usually doesn't).
>
> -Doug
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20090106/c1866376/attachment.html>


More information about the Concurrency-interest mailing list