View Single Post
Old 06-14-2011, 04:10 AM   #77
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,471
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Yes, but I think the complexity of knowing the entire chain in advance would lead to bugs. In addition, it doesn't deal well with job forks (alternate jobs later in the chain), although I don't think we currently have any of those.

Something that would work and be easier to live with (I think) would be to add a second queue to the job manager, a 'job chain' queue, and another parameter to create_job indicating that this job is part of a chain. The job dispatcher would take jobs from that queue until empty, then take jobs from the normal queue. FD semantics ensure that the next job is queued before the first job terminates. Thus, if one uses FD around done and sets the job_chain parameter, then the chain will be atomic.
chaley is offline   Reply With Quote