File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
CoreFoundation/Base.subproj Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -1179,7 +1179,7 @@ void __CFInitialize(void) {
11791179 if (!__CFInitialized && !__CFInitializing ) {
11801180 __CFInitializing = 1 ;
11811181
1182- #if __HAS_DISPATCH__
1182+ #if __HAS_DISPATCH__ && ! TARGET_OS_MAC
11831183 // libdispatch has to be initialized before CoreFoundation, so to avoid
11841184 // issues with static initializer ordering, we are doing it explicitly.
11851185 libdispatch_init ();
Original file line number Diff line number Diff line change @@ -1134,14 +1134,17 @@ open class Process: NSObject {
11341134 open func waitUntilExit( ) {
11351135 let runInterval = 0.05
11361136 let currentRunLoop = RunLoop . current
1137- let checkRunLoop : ( ) -> Bool = ( currentRunLoop == self . runLoop)
1138- ? { currentRunLoop. run ( mode: . default, before: Date ( timeIntervalSinceNow: runInterval) ) }
1139- : { currentRunLoop. run ( until: Date ( timeIntervalSinceNow: runInterval) ) ; return true }
11401137
1141- // update .runLoop to allow early wakeup.
1138+ let runRunLoop : ( ) -> Void = ( currentRunLoop == self . runLoop)
1139+ ? { currentRunLoop. run ( mode: . default, before: Date ( timeIntervalSinceNow: runInterval) ) }
1140+ : { currentRunLoop. run ( until: Date ( timeIntervalSinceNow: runInterval) ) }
1141+ // update .runLoop to allow early wakeup triggered by terminateRunLoop.
11421142 self . runLoop = currentRunLoop
1143- while self . isRunning && checkRunLoop ( ) { }
1144-
1143+
1144+ while self . isRunning {
1145+ runRunLoop ( )
1146+ }
1147+
11451148 self . runLoop = nil
11461149 self . runLoopSource = nil
11471150 }
You can’t perform that action at this time.
0 commit comments