Swift Readers-writer-lock Resources