On Aug 19, 2017, at 2:02 AM, Susan Cheng <[email protected]> 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
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
