标签:main loop pat isp select queue eth 主线程 selector
1-GCDblockblock
dispatch_async(dispatch_get_main_queue(), ^{
});
2-NSOperation
NSOperationQueue *mainQueue = [NSOperationQueue
mainQueue];
NSBlockOperation *operation = [NSBlockOperation
blockOperationWithBlock:^{
}];
[mainQueue addOperation:operation];
3-NSThread
[selfperformSelector:@selector(method)
onThread:[NSThread mainThread] withObject:nilwaitUntilDone:YESmodes:nil];
[selfperformSelectorOnMainThread:@selector(method)
withObject:nilwaitUntilDone:YES];
[[NSThread mainThread] performSelector:
@selector(method) withObject:nil];
4-RunLoop
[selfperformSelectorOnMainThread:@selector(method)
withObject:nilwaitUntilDone:YES];
[[NSThread mainThread] performSelector:
@selector(method) withObject:nil];
? RunLoop
[[NSRunLoop mainRunLoop] performSelector:@selector(method) withObject:nil];
标签:main loop pat isp select queue eth 主线程 selector
原文地址:http://www.cnblogs.com/CJH5209/p/6072149.html