dustinrue / ControlPlane

ControlPlane - context-sensitive computing for OS X
http://www.controlplaneapp.com
BSD 3-Clause "New" or "Revised" License
1.76k stars 180 forks source link

Finish replacing locks with @synchronized #457

Closed bunnyhero closed 7 years ago

bunnyhero commented 7 years ago

I was seeing occasional crashes in RunningApplicationEvidenceSource, where an NSMutableArray was being mutated while being iterated over. It looks like 51b3c215cf5f067b66357a7ff43792b24497e601 was meant to replace the lock with @synchronized, but it didn't happen throughout the entire file (also, the lock member was never initialized). I finished converting the NSLocks to @synchronized, and I haven't seen this crash since.