matthewcheok / Realm-JSON

A concise Mantle-like way of working with Realm and JSON.
MIT License
661 stars 129 forks source link

Mutex lock static variables #77

Closed viktorasl closed 8 years ago

viktorasl commented 8 years ago

We've been getting quite a lot of (usually not the same crash group be different related to one another) crashes related to this library parsing huge chunk of jsons

screen shot 2016-01-06 at 08 56 04

After some time of investigation we've found that it's related to multiple threads accessing/modifying the same static dictionaries (as they are not tread-safe). So I have added mutex-lock for those dictionaries and apparently it solved the problem.