[concurrency-interest] ParallelArray updates du jour

Tim Peierls tim at peierls.net
Sun Jan 20 15:28:54 EST 2008


On Jan 18, 2008 6:25 PM, Peter Kovacs <peter.kovacs.1.0rc at gmail.com> wrote:

> In more concrete terms: I feel I could make good use of a high-level
> explanation of how the new API is helping me (the "concurrency dummy") solve
> problems more easily and more safely than the already existing concurrency
> infrastructure.
>

I think the question is: For what problems is this new API better-suited
than existing tools? The class javadocs for ForkJoinTask, RecursiveAction,
and RecursiveTask sort of answer this.

http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166ydocs/jsr166y/forkjoin/ForkJoinTask.html

Crude paraphrase: Use fork-join when you can express a big computation as
lots of fine-grained tasks that can wait for other such tasks to complete
but otherwise never (or very rarely) block. And don't expect too much from
this stuff on a uniprocessor.

For example, fork-join would not work well for full request-to-response
handling in a server (use existing tools for that), but it might be useful
to implement a compute-bound stage of such a server.


 (I am not even sure which is the head and which is the tail of this API
> beast.)
>

One thing that might not be clear from the javadocs is that the
ParallelArray stuff is written on top of the fork-join stuff; it's an
application of fork-join. It's a little confusing because everything is in
one package currently.

--tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20080120/54c0234f/attachment.html 


More information about the Concurrency-interest mailing list