Merge pull request #10228 from Filoppi/fix_android_input_deadlock

ControllerInterface: fix UpdateReferences() deadlock
This commit is contained in:
Léo Lam 2021-11-23 16:27:03 +01:00 committed by GitHub
commit e1e3db13ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 36 deletions

View file

@ -80,8 +80,7 @@ Settings::Settings()
// they'd continue living until the queued event has run, but some devices can't be recreated
// until they are destroyed.
// This is safe from any thread. Devices will be refreshed and re-acquired and in
// DevicesChanged(). Waiting on QueueOnObject() to have finished running was not feasible as
// it would cause deadlocks without heavy workarounds.
// DevicesChanged(). Calling it without queueing shouldn't cause any deadlocks but is slow.
emit ReleaseDevices();
QueueOnObject(this, [this] { emit DevicesChanged(); });