<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 25 Aug 2017, at 09:04, Marc Schlichte &lt;<a href="mailto:marc.schlichte@googlemail.com" class="">marc.schlichte@googlemail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">Am 24.08.2017 um 22:05 schrieb Thomas via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt;:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><br class="Apple-interchange-newline">Yes, I think it is mandatory that we continue on the callers queue after an `await ` on some actor method.</div><div class=""><br class=""></div><div class="">If you `await` on a non-actor-method though, you would have to changes queues manually if needed.</div><div class=""><br class=""></div><div class="">Any `actor` should have a `let actorQueue: DispatchQueue` property so that we can call in these cases:</div><div class=""><br class=""></div><div class="">```await actorQueue.asyncCoroutine()``` as mentioned in the manifesto.</div></div></div></blockquote><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"></div><div class="">Wouldn't that be really confusing though? That awaiting certain methods would bring us back to the actor's queue but awaiting others would require manual queue hopping? What if the compiler was to always generate the 'await actorQueue.asyncCoroutine()' queue hopping code after awaiting on an async/actor method?</div><div class=""><br class=""></div><div class="">Thomas</div></div><br class="Apple-interchange-newline"></div></blockquote></div><br class=""><div class="">I think we are not allowed to implicitly switch back to the actor's queue after awaiting non-actor methods. These might have been auto converted from Continuation-Passing-Style (CPS) to async/await style. With the `mainActor` idea from the manifesto, all existing code will run in some actor, so changing the queue semantics could break existing code.</div></div></div></blockquote><br class=""></div><div>This would only happen when the caller is an actor, which means new code, so I don't think we would be breaking any existing code.</div><br class=""><div class="">Thomas</div><div class=""><br class=""></div></body></html>