Is CFUUIDCreate thread-safe? Didn’t see anything about that in the docs.
Is CFUUIDCreate thread-safe? Didn’t see anything about that in the docs .
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Based on the current 10.8.2 source code, it’s certainly intended to be thread-safe. The body of the function uses a
LOCKED()function todispatch_syncall the real work onto a single serial GCD dispatch queue. Simultaneous calls from multiple threads would therefore be serialized.If you’re interested in earlier versions of Mac OS X, you can find the code here. Unfortunately Apple doesn’t release the source code of CoreFoundation on iOS, but it’s probably safe to assume that it’s similar to the OS X version.