[swift-evolution] [Concurrency] async/await + actors
    Chris Lattner 
    clattner at nondot.org
       
    Sat Aug 19 18:06:16 CDT 2017
    
    
  
On Aug 19, 2017, at 2:02 AM, Susan Cheng <susan.doggie at gmail.com> wrote:
> Hi chris,
> 
> is a actor guarantee always process the messages in one by one?
> so, can it assume that never being multiple threads try to modify the state at the same time?
Yep, that’s the idea.
> P.S. i have implemented similar idea before:
> 
> https://github.com/SusanDoggie/Doggie/blob/master/Sources/Doggie/Thread/Thread.swift <https://github.com/SusanDoggie/Doggie/blob/master/Sources/Doggie/Thread/Thread.swift>
> https://github.com/SusanDoggie/Doggie/blob/master/Sources/Doggie/SDTriggerNode.swift <https://github.com/SusanDoggie/Doggie/blob/master/Sources/Doggie/SDTriggerNode.swift>
Cool.  That’s one of the other interesting things about the actor model.  We can prototype and build it as a completely library feature to get experience with the runtime model, then move to language support (providing the additional safety) when things seem to work well in practice.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170819/1b7b7f64/attachment-0001.html>
    
    
More information about the swift-evolution
mailing list