View Single Post
Old 06-11-2011, 12:19 PM   #22
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,501
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@meme: This is complicated. From what I see, in all DeviceJobs a call to the 'done' function is scheduled (signal emitted on a queued connection), then the job terminates. This allows the next job to start, without necessarily having run the done function. Because of this, your plugin gets called before the database is updated. The done function is queued behind you, assuming that you are running on the GUI thread.

@kovid: I think that FunctionDispatcher should be used instead of Dispatcher. That way the done function will be finished before the job terminates.
chaley is offline   Reply With Quote