In this case, there is no data race, because await
will capture the UI context and resume the async
methods in that context. You may find my async
introduction post helpful.
The order in which they resume is not guaranteed, but they are not concurrent in the sense of preemption. In a UI context, you can think of the async
method as split into several chunks (at each await
). Each chunk will execute one at a time and cannot be preempted by another chunk.