Skip to content
Commit b0e172f0 authored by Andrés G. Aragoneses's avatar Andrés G. Aragoneses
Browse files

DapService: avoid freezing Banshee when unmapping device (bgo#723040)

It could happen that a Map event generated a process that
could take a while to detect the device, which would hold the
DapService.sync lock, which is also used by the Unmap events,
and the latter events run in the main thread, so this could
mean that banshee gets frozen for a time as long as it takes
to detect/connect to the device.

To fix this we simply need to spawn a thread for the Unmap
operation. This thread will later call ThreadAssist API again
to come back to the main thread when the UI needs to be
changed, but that's ok. On top of that, the Dispose() was
actually being called outside this ThreadAssist.ProxyToMain()
call, so it was generating bad gui-thread-check traces, so
it's a good time to fix this as well.
parent fd08a428
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment