Avoiding race conditions in Swift | Hacker News Reader