While using this library, I noticed that I was experiencing a crash in the MapboxImageAPI class, due to multiple threads accessing the pendingFetches at the same time. I added some dispatch calls to ensure that accesses to the pendingFetches array don't interfere with each other. I may have been a little too strict when limiting access, but I thought it would be better to be safe.
I ran the example project and everything seems to work fine. My app works fine with these changes, too.
While using this library, I noticed that I was experiencing a crash in the
MapboxImageAPI
class, due to multiple threads accessing thependingFetches
at the same time. I added some dispatch calls to ensure that accesses to thependingFetches
array don't interfere with each other. I may have been a little too strict when limiting access, but I thought it would be better to be safe.I ran the example project and everything seems to work fine. My app works fine with these changes, too.