You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- (void)waitUntilFinished {
if ([NSThread isMainThread]) {
[self warnOperationOnMainThread];
}
@synchronized(self.lock) {
if (self.completed) {
return;
}
[self.condition lock];
}
// TODO: (nlutsenko) Restructure this to use Bolts-Swift thread access synchronization architecture
// In the meantime, it's absolutely safe to get `_completed` aka an ivar, as long as it's a `BOOL` aka less than word size.
while (!_completed) { // <- READ data from there.
[self.condition wait];
}
[self.condition unlock];
}
Also there seems to be a note about it:
// TODO: (nlutsenko) Restructure this to use Bolts-Swift thread access synchronization architecture
// In the meantime, it's absolutely safe to get _completed aka an ivar, as long as it's a BOOL aka less than word size.
We see other data races in bolts related to the concurrency model employed, mostly read on BOOL completed that are concurrent and not on the same thread.
The text was updated successfully, but these errors were encountered:
Issue reported in Parse SDK GitHub: parse-community/Parse-SDK-iOS-OSX#1175
Insights courtesy of @flovilmart :
The text was updated successfully, but these errors were encountered: