We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1136a6e commit cf9d303Copy full SHA for cf9d303
CoreFoundation/Base.subproj/CFPlatform.c
@@ -249,11 +249,7 @@ const char *_CFProcessPath(void) {
249
250
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_BSD
251
CF_CROSS_PLATFORM_EXPORT Boolean _CFIsMainThread(void) {
252
-#if defined(__OpenBSD__)
253
- return pthread_equal(pthread_self(), _CFMainPThread) != 0;
254
-#else
255
return pthread_main_np() == 1;
256
-#endif
257
}
258
#endif
259
@@ -778,7 +774,7 @@ static void __CFTSDFinalize(void *arg) {
778
774
#if TARGET_OS_WASI
779
775
__CFMainThreadHasExited = true;
780
776
#else
781
- if (_CFIsMainThread()) {
777
+ if (pthread_main_np() == 1) {
782
// Important: we need to be sure that the only time we set this flag to true is when we actually can guarentee we ARE the main thread.
783
784
0 commit comments