Advanced
Swift
Q98 / 100
What is the Swift actor reentrancy problem?
Correct! Well done.
Incorrect.
The correct answer is B) Between await suspension points, another call may mutate actor state, making cached state before the await stale when execution resumes
B
Correct Answer
Between await suspension points, another call may mutate actor state, making cached state before the await stale when execution resumes
Explanation
let balance = account.balance; await transfer(); // balance may be stale here! Between the await, another Task may have changed balance. Re-read state after every suspension.
Progress
98/100