View Single Post
Old 06-13-2011, 01:34 PM   #73
chaley
CC Android & calibre dev
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: 8,709
Karma: 2655880
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by meme View Post
So it looks like modifying the code to use more appropriate functions to update the info worked!
My suspicion is that it works because of job sequencing. Using this function will run two jobs instead of one, with the second job added after the first. This gives whatever else is being run a chance to finish before the 'books' job starts.

@kovid: I think if we are going down the road of having plugins run private and 'standard' jobs, then we might need a way for the plugin to wait until all jobs are finished. The problem is that there is nothing that ensures that a serial-job chain is not interleaved with another serial-job chain. This could be done as a special "job" that fires only when the job queue is empty and all Dispatch-style 'done' functions have finished. Converting Dispatch to FunctionDispatch and running it from another thread would permit collecting the information.
chaley is offline   Reply With Quote