Skip to content
Commit f80a2065 authored by Philip Withnall's avatar Philip Withnall 🚫
Browse files

core: Prevent deadlock when closing a cancelled GDataUploadStream

When closing a GDataUploadStream which has already been cancelled, the
cancellation callback would be executed in the same thread as
gdata_upload_stream_close(), causing a deadlock (as they both tried to hold
the same lock). The only solution I can think of is to move the cancellation
out to the main thread, which ensures that deadlock will only happen if the
application is doing synchronous I/O (i.e. gdata_upload_stream_close() gets
called in the main thread). If they're doing that, they deserve the deadlock.
Spotted by George Stephanos <gaf.stephanos@gmail.com>. Helps: bgo#607620
parent c760229b
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