Semaphores aren't safe. NSLock can be used safely but require caution to only use in synchronous code and not across an await.