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
Please register or sign in to comment