Closed Mourad-Aly closed 7 years ago
Hi @nlutsenko,
Seems a deadlock, since self.condition
will wait in self.lock
, and self.condition
's signaling is happening in another self.lock
block as well. I'm running tests locally to check whether it's caught by tests or not.
Any concern is appreciated. Thanks.
Hi,
I've faced racing condition while using Bolts in our Apps, same issue reported before https://github.com/BoltsFramework/Bolts-ObjC/issues/302 Hot fix is to ensure locking the
completed
variable, however I don't know why wasn't it already in the lock block (deadlock?)? This is why I'm submitting this PR to ensure that the server tests will not fail since I'm unable to run tests locally (will figure this out). I'd suggest handling thread safety forBFTask
in an easier-to-read way than locks, what do you think?GCD
for example,sync_barrier
?Updates: I've just seen https://github.com/BoltsFramework/Bolts-ObjC/pull/303 👍