We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crash reason : update UI in a Background thread
fix :
The text was updated successfully, but these errors were encountered:
- (void)handleThreadStateChanged:(NSNotification *)notification { if ([notification object] == dataController) { NSString * threadState = [[notification userInfo] objectForKey:MVStatusUserInfoKey]; if ([threadState isEqualToString:MVStatusTaskStarted] == YES) { if (OSAtomicIncrement32(&threadCount) == 1) { dispatch_async(dispatch_get_main_queue(), ^{ [progressIndicator setUsesThreadedAnimation:YES]; [progressIndicator startAnimation:nil]; [stopButton setHidden:NO]; }); } } else if ([threadState isEqualToString:MVStatusTaskTerminated] == YES) { if (OSAtomicDecrement32(&threadCount) == 0) { dispatch_async(dispatch_get_main_queue(), ^{ [progressIndicator stopAnimation:nil]; [statusText setStringValue:@""]; [stopButton setHidden:YES]; }); } } } }``` Wrap the crashed code with main queue dispatch
Sorry, something went wrong.
No branches or pull requests
crash reason : update UI in a Background thread
fix :
The text was updated successfully, but these errors were encountered: