0
我已经在我的课私有变量:如何使用BOOL变量同步两个线程?
BOOL isEnabled;
和方法:
-(void) foo {
if(isEnabled) {
// do some operations
}
else {
// wait till other thread makes isEnabled = TRUE and do operations
}
}
我需要以某种方式synchnize的方法。在isEnabled
成为真实后,我可以做我的操作。
真的感谢您的解释 – Buron 2012-03-21 09:00:22