I did think about it, but couldn't find a case where it would happen. To deadlock, the done function would need to wait for the result of another job, and I didn't find a case of that.
One the other hand, I did find several cases where the done function does things to the device, such as messing with the booklists and then starting a sync_booklists job. These changes happen on the GUI thread while possibly another job is running. I don't think that simultaneous access to the booklists is a good thing, and this change will prevent that.
|