【发布时间】:2014-05-26 10:22:07
【问题描述】:
似乎函数调用[self updateUI];被boo阻塞了。
boo 是在另一个后台线程中运行,还是与下面的代码中的 foo 相同?
[self updateUI];如何不被boo阻塞?
- (void)MainFunction
{
[self performSelectorInBackground@selector(foo) withObject:nil];
}
- (void)foo
{
[self performSelectorInBackground@selector(boo) withObject:nil];
//updaate UI in MainThread
[self updateUI];
}
- (void)boo
{
//function here take long time to run;
}
【问题讨论】:
-
先调用main函数,然后调用foo和boo?
标签: ios multithreading blocking background-thread