mapbox / mapbox-scenekit

Other
231 stars 51 forks source link

Fixed crash caused by concurrent access to pendingFetches array in MapboxImageAPI class #80

Closed psahgal closed 5 years ago

psahgal commented 5 years ago

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.

psahgal commented 5 years ago

Closing in favor of #79.