plexinc / plex-for-kodi

Offical Plex for Kodi add-on releases.
GNU General Public License v2.0
251 stars 124 forks source link

Put locks around access to UI elements from main and other threads. #272

Closed gbooker closed 5 years ago

gbooker commented 5 years ago

GHI (If applicable): None

Description:

I was seeing cases where hubs were incompletely rendered. A hub that has 20 items across only shows 1, 2, 3, etc… Additionally, I was seeing crashes when exiting PfK and the two seemed to be linked. Putting locks around the concurrent access point between the main thread and the background worker threads appears to have resolved both issues.

PR best viewed by ignoring whitespace.

Checklist:

pannal commented 5 years ago

This is great. I've been unable to find the cause for this issue, which happens from time to time.