~/talk

The Swift Actor Pitfall: Understanding and Managing Reentrancy

Talkat iOS Conf SG 2024 · 2024-01-18..01-19· [swift]
slides:none on file

Actors prevent data races but allow logic bugs when an awaited call creates a suspension point and a second task re-enters, exemplified by two concurrent withdrawals of $800 and $500 against an $11,000 balance that nevertheless ends negative. Concrete fixes use Swift async actors: avoid mutable-state access across suspension points, authorize before checking or recheck after suspension, and treat suspension points as the place to audit or serialize state changes rather than assume sequential safety.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.