We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6b2c8cf + 281d78a commit ccc6e7bCopy full SHA for ccc6e7b
CoreFoundation/Base.subproj/CFPlatform.c
@@ -612,7 +612,10 @@ CF_PRIVATE void __CFFinalizeWindowsThreadData() {
612
static pthread_key_t __CFTSDIndexKey;
613
614
CF_PRIVATE void __CFTSDInitialize() {
615
- (void)pthread_key_create(&__CFTSDIndexKey, __CFTSDFinalize);
+ static dispatch_once_t once;
616
+ dispatch_once(&once, ^{
617
+ (void)pthread_key_create(&__CFTSDIndexKey, __CFTSDFinalize);
618
+ });
619
}
620
621
static void __CFTSDSetSpecific(void *arg) {
0 commit comments