Let's imagine I have a code:
func someMethod() async {
... // processing 1
let someProperty = await someService.callSomeMethod()
... // processing 2
}
It is becoming clear from WWDC that the code executed before and after await can be executed on different threads.
But what if I want to guarantee a single thread for execution?
It is clear that if we are talking about a forced context switch to the main thread, it is enough to designate the method with @MainActor attribute, but suppose I want to isolate myself from specific threads, it is only important for me that everything in someMethod is executed in one context? (processing 1 and processing 2 have the same context)
Nutshell, there are some analog of ConfigureAwait (c sharp) in swift?