Skip to content

Commit 54df708

Browse files
Replace deprecated performSelectorOnMainThread with dispatch_async
1 parent 7f151e9 commit 54df708

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

AppBox/AppDelegate.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ +(AppDelegate *)appDelegate{
165165

166166
+(void)terminateWithExitCode:(NSInteger)code {
167167
[AppDelegate appDelegate].exitCode = code;
168-
[[NSApplication sharedApplication] performSelectorOnMainThread:@selector(terminate:) withObject:nil waitUntilDone:NO];
168+
dispatch_async(dispatch_get_main_queue(), ^{
169+
[[NSApplication sharedApplication] terminate:nil];
170+
});
169171
}
170172

171173
-(void)openLatestLogFile {

0 commit comments

Comments
 (0)