Active Objects | Actors | Synchronisations


(Suminda Dharmasena) #1

Hello,

Unlike in Java a better model for synchronisation would be active objects
where you can specify groupings of parallelism or serialism, i.e., being
able to specify that calls to a group of functions can only happen one
after the other.

Perhaps this can be in the form of an attribute. E.g.
@active(group="ObjXYZStateChange") or @actor(receive="aFunc")

Suminda


(Chris Lattner) #2

Hi Suminda,

Many people are interested in synchronization and concurrency designs of many forms, but we can’t handle a full discussion about it in the Swift 3 cycle:

-Chris

···

On Jan 13, 2016, at 7:24 PM, Suminda Dharmasena via swift-evolution <swift-evolution@swift.org> wrote:

Hello,

Unlike in Java a better model for synchronisation would be active objects where you can specify groupings of parallelism or serialism, i.e., being able to specify that calls to a group of functions can only happen one after the other.

Perhaps this can be in the form of an attribute. E.g. @active(group="ObjXYZStateChange") or @actor(receive="aFunc”)


(Javier Soto) #3

I'm personally super excited about Swift adopting some kind of concurrency
abstraction. However, the team has indicated that this is our of scope for
Swift 3: https://github.com/apple/swift-evolution/blob/master/README.md

On the other hand, there's been a lot of library innovation in this area,
so I think it's good it'll take some more time for any of this to happen in
the language itself, since some of these ideas could mature before
committing them into the language.

···

On Wed, Jan 13, 2016 at 7:24 PM Suminda Dharmasena via swift-evolution < swift-evolution@swift.org> wrote:

Hello,

Unlike in Java a better model for synchronisation would be active objects
where you can specify groupings of parallelism or serialism, i.e., being
able to specify that calls to a group of functions can only happen one
after the other.

Perhaps this can be in the form of an attribute. E.g.
@active(group="ObjXYZStateChange") or @actor(receive="aFunc")

Suminda
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

--
Javier Soto


(Suminda Dharmasena) #4

Just for the record and future consideration and study.

One interesting language which does have actors built in is:
http://www.ponylang.org/. Also http://elixir-lang.org/.

Maybe for future Swift can have multiple mailboxes grouping commonly
occurring mutations to state.