Create ConcurrencyRoadmap.md by airspeedswift · Pull Request #34517 · swiftlang/swift (original) (raw)

Typo: There are a couple spots where Controller is misspelled in PlayerRefreshControler.

I have a couple questions after reading the document. I think there's an opportunity for clarification in the "things to note" sections:

  1. The document states:

You can mark classes and functions as being tied to that actor with an attribute. The compiler will let you reference this class from anywhere, but to actually call this method, you need to be on the UI actor.

Does that mean I need to explicitly call the function from the UI actor, or is that handled automatically when I call the function (from any actor/queue)?

  1. If one async function calls another, is it possible for the first one to be resumed on a different queue than the one it was on when it invoked the second function? Does the behavior vary depending on whether my function is in an actor class?

For example, if I invoke some UI functions and then call an async function, can I expect to still be on the UI queue when it returns so I can continue updating the UI?

Thanks! I'm really excited to see this becoming available :)