State of Loom
Mike Rettig
mike.rettig at gmail.com
Wed May 27 13:29:57 UTC 2020
On Tue, May 26, 2020 at 7:56 PM Rob Nikander <rob.nikander at gmail.com> wrote:
>
> Hi,
>
> I read the State of Loom article and it sounds great. I’m wondering if it is going to be flat-out better than async/await or if there are tradeoffs.
There are always trade-offs. Async/await allows developers to
explicitly control the parallelism of a workflow. Virtual threads
provide no explicit control over parallelism but complement
async/await by providing a lightweight thread api without resorting to
specialized async api's for blocking calls. When choosing between
virtual threads, os threads, callbacks, or async/await, it all depends
on the problem at hand.
>If all Java functions are going to be compiled to deal with this more dynamic “stack”, to avoid the two-colored world, does that mean that all Java functions (even those that don’t use async) will pay some performance penalty?
>
> I’m wondering if there is any reason to have colored functions in other languages, or if they should copy/steal this technique as well. :) Maybe it requires a VM/JIT/GC to work well.
>
> Rob
>
> On 2020-05-15 16:55, Ron Pressler wrote:
> > Hello.
> >
> > I’ve posted a document describing the project’s goals and current progress:
> >
> > http://cr.openjdk.java.net/~rpressler/loom/loom/sol1_part1.html
> >
> > It is accompanied by a new EA build, based on jdk-15+21.
> >
> > http://jdk.java.net/loom/
> >
> > The new continuations algorithm is now switched on by default, so if you haven’t
> > explicitly turned it on before, you may see some performance improvements.
> > You can switch it off with -XX:-UseContinuationChunks.
> >
> > — Ron
> >
> >
> >
>
>
More information about the loom-dev
mailing list