RetroAchievements / RAIntegration

The DLL responsible to integrate emulators with RetroAchievements.org
https://retroachievements.org
MIT License
98 stars 23 forks source link

attempt to prevent deadlock #1027

Closed Jamiras closed 1 year ago

Jamiras commented 1 year ago

Extension of #1026.

Data binding events were trying to execute UI code from the non-UI thread. If the UI thread was blocked waiting for the search results to be updated, a deadlock would occur: https://discord.com/channels/310192285306454017/1149693430306447380/1152705143394009262

This attempts to keep the UI thread from being blocked by detecting that the list is being updated and setting a flag so the code that needs the lock on the UI thread can be called after the list finishes updating.