[swift-evolution] [Concurrency] Theoretical question about actors vs async

Pierre Habouzit phabouzit at apple.com
Mon Sep 18 00:59:38 CDT 2017


> On Sep 17, 2017, at 5:00 AM, Benjamin G via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I've read Chris Lattner proposal on concurrency, and if i'm correct, the proposal is to start implementing async / await mechanism first, then other more evolved mechanisms (such as actors) on top later.
> 
> My question after reading the many conversations (and confusion) around the execution order of async / await on the mailing list is this : 
> Isn't the actor model a more "elementary" concurrency model than async / await, and so, from a theoretical point of view, wouldn't it make more sense to implement it first as a layer to build future other concurrency mechanisms on top ?
> 
> I'm putting emphasis on the "theoretical" aspect of my question, because i'm 100% certain that if Mr Lattner decided to go this path, it's because it makes more sense from an implementation point of view. 

Actors is a way higher level construct than async/await.

async/await is IMO an interesting low level construct that explains to the language where your execution flow requires to be broken in two (what is syntactically before and after the "await") to wait for some event before the second half can be done.

Unlike Actors, it doesn't try to explain what/how/... this is done, which makes it lower level.

-Pierre

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170917/83551623/attachment.html>


More information about the swift-evolution mailing list