You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuweni.apache.org by Brian McGee <br...@41north.dev> on 2020/12/04 08:15:07 UTC

Understanding the concurrency model

Hi Antoine,

I would like to understand the reasoning behind the introduction of the
AsyncCompletion interface. From a cursory glance the same functionality is
available through other concurrency primitives such as coroutines, which I
can also see in places in the codebase and can also see some code to help
bridge coroutines and AsyncCompletion.

Is this interface an attempt to try and unify various underlying
concurrency models that libraries are bringing in or something similar?

-- 
*Brian McGee *
Co-Founder | °*41North <http://41north.dev>*

Re: Understanding the concurrency model

Posted by Brian McGee <br...@41north.dev>.
Makes perfect sense, I suspected something like this.

On Fri, 4 Dec 2020 at 08:22, Antoine Toulme <an...@toulme.name> wrote:

> AsyncCompletion and AsyncResult date back to the early days and were
> better geared and less heavy to manipulate than CompletableFutures.
>
> We then spent more time in Kotlin and in coroutines. There was a bit of
> thinking to move more towards coroutines. We kept them in place when we’d
> move back from Kotlin to Java.
>
> > On Dec 4, 2020, at 12:15 AM, Brian McGee <br...@41north.dev> wrote:
> >
> > Hi Antoine,
> >
> > I would like to understand the reasoning behind the introduction of the
> > AsyncCompletion interface. From a cursory glance the same functionality
> is
> > available through other concurrency primitives such as coroutines, which
> I
> > can also see in places in the codebase and can also see some code to help
> > bridge coroutines and AsyncCompletion.
> >
> > Is this interface an attempt to try and unify various underlying
> > concurrency models that libraries are bringing in or something similar?
> >
> > --
> > *Brian McGee *
> > Co-Founder | °*41North <http://41north.dev>*
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tuweni.apache.org
> For additional commands, e-mail: dev-help@tuweni.apache.org
>
>

-- 
*Brian McGee *
Co-Founder | °*41North <http://41north.dev>*

Re: Understanding the concurrency model

Posted by Antoine Toulme <an...@toulme.name>.
AsyncCompletion and AsyncResult date back to the early days and were better geared and less heavy to manipulate than CompletableFutures.

We then spent more time in Kotlin and in coroutines. There was a bit of thinking to move more towards coroutines. We kept them in place when we’d move back from Kotlin to Java.

> On Dec 4, 2020, at 12:15 AM, Brian McGee <br...@41north.dev> wrote:
> 
> Hi Antoine,
> 
> I would like to understand the reasoning behind the introduction of the
> AsyncCompletion interface. From a cursory glance the same functionality is
> available through other concurrency primitives such as coroutines, which I
> can also see in places in the codebase and can also see some code to help
> bridge coroutines and AsyncCompletion.
> 
> Is this interface an attempt to try and unify various underlying
> concurrency models that libraries are bringing in or something similar?
> 
> -- 
> *Brian McGee *
> Co-Founder | °*41North <http://41north.dev>*


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tuweni.apache.org
For additional commands, e-mail: dev-help@tuweni.apache.org