[concurrency-interest] ForkJoinPool for async http calls?

Christian Essl christianessl at googlemail.com
Thu May 10 11:25:43 EDT 2012


First thanks for this great work and its really an honor to me that
such great coders like you answer my questions.

The main reason I asked the original question is not that much about
raw performance but more about code-simplicity in the sense to code
like in a traditional blocking style but still have better performance
and less blocking (not necessarily none).

So I hoped to get a somehow sulution with my original attempt.

Regarding CountedCompleter an example usage for IO would certainly
help me, because I don't know where I should plugin the
completion-callback for async-IO or alternatively do the blocking IO.


Thanks
Christian

On Thu, May 10, 2012 at 2:57 PM, Doug Lea <dl at cs.oswego.edu> wrote:
> On 05/10/12 08:12, Christian Essl wrote:
>>
>> As said I like the akka-framework, still it would be very nice if
>> anybody could answer my original question whether ForkJoinTasks can
>> give a sort of non-blocking future also suitable for async IO, because
>> I am stil not sure.
>
>
> The jsr166y/jdk8 CountedCompleter and related updates are specifically
> aimed to better support IO-bound and other non-computationally-bound
> tasks. The javadocs and examples probably don't yet do a good enough
> job in showing how. (Partly because IO examples are always too bulky
> to make for simple understandable examples; suggestions would be welcome.)
>
> The syntax and constructions for using them are not as nice as in
> akka/Scala.
> On the other hand the ability to effectively AND completion triggers
> via counts (not found yet in Scala versions) is handy.
>
> -Doug
>
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest


More information about the Concurrency-interest mailing list