Add missing import of OSAtomic
Document more synchronization details