nvda
bc4402b2 - eventHandler: Fix race conditions which could leave NVDA in a state where it constantly reported there were pending events when there weren't, causing weird problems such as menu items not being reported.

Commit
11 years ago
eventHandler: Fix race conditions which could leave NVDA in a state where it constantly reported there were pending events when there weren't, causing weird problems such as menu items not being reported. Queued events are always executed in the main thread, but they can be queued from any thread. Incrementing/decrementing the pending event counts is not atomic, so place a lock around updates to the count data. Also, when queuing, update the counts before actually queuing the function. Otherwise, if queuing from a background thread, the queued function might run before the counts were updated. Fixes #3939.
Author
Committer
Parents
Loading