[vertx-dev] Async-Await in Vertx with Project Loom

August Nagro augustnagro at gmail.com
Thu Oct 21 07:12:21 UTC 2021


Thanks Julien!

I had cc'd loom-dev, which told me the same; Continuation is now private. (
https://mail.openjdk.java.net/pipermail/loom-dev/2021-October/002989.html).
I updated the repo README with a warning.

Ron pointed out that a custom scheduler could support some Continuation use
cases, but now that I've thought about it some more; I think we can
actually implement 'async/await' with just a Virtual Thread and a lock.

Here's a gist with one approach:
https://gist.github.com/AugustNagro/29eaddbd281621a35dcd8b98337d5369

Now my big question is how Virtual Threads fit into the Vertx/Netty
event-loop story.

Cheers,

- August

On Mon, Oct 18, 2021 at 11:49 PM Julien Viet <julien at julienviet.com> wrote:

> Hi August,
>
> this is very exciting, there are a few ways Vert.x could use Loom and
> experimentations need to be done, thanks for coming with this project.
>
> I can see you are using the Continuation class from Loom, do you know
> wether this class will remain available ? I attended a presentation a
> long time ago and the presenter (Loom lead) said that such classes
> would remain internal.
>
> I encourage you to share this with the async / Vert.x community, I
> created a Loom channel [1] on our discord server where people like you
> can share their experiment and discuss Loom + Vert.x :-)
>
> Julien
>
> [1] https://discord.com/channels/751380286071242794/899911362770268181
>
> On Mon, Oct 18, 2021 at 5:14 AM August Nagro <augustnagro at gmail.com>
> wrote:
> >
> > Hello; I recently implemented async/await in Vertx using Project Loom.
> >
> > Feedback and code review are very welcome. The project is only about 100
> lines of code. Hopefully something similar could be merged into
> `vertx-core` when Loom is released.
> >
> > https://github.com/AugustNagro/vertx-loom
> >
> > Cheers,
> >
> > August
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "vertx-dev" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to vertx-dev+unsubscribe at googlegroups.com.
> > To view this discussion on the web, visit
> https://groups.google.com/d/msgid/vertx-dev/CAHNb0ZN9%2B9HDNfgXj63%2BhFkW6Us%2B3d3TQFGu8aX2fyOxGUiLmw%40mail.gmail.com
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "vertx-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vertx-dev+unsubscribe at googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/vertx-dev/CA%2BH-X4-Uf6t7wanrSKo%2BNwGJwixz5cWQVPOgtcgsJyOHb_RVog%40mail.gmail.com
> .
>


More information about the loom-dev mailing list