[self request]; //main thread
- (void)request {
[self performSelectorInBackground:@selector(regFun) withObject:nil];
}
- (void)regFun {
CFRunLoopRun();
CCLOG(@"CFRunLoopRun not work");
}
鉴于前面的代码,你知道为什么CFRunLoopRun()
不起作用吗?我需要regFun
在后台打电话。
还有其他方法可以停止后台线程吗?