« Previous | Next » 

Revision b95479a5

IDb95479a54e66d49981daf37c97879d4d4c82035e

Added by Michael Hanselmann almost 11 years ago

Implement chained jobs

An overview is available in the design document for this change,
doc/design-chained-jobs.rst.

When a job enters the job processor, the current opcode's dependencies
are evaluated. If a referenced job has not yet reached the desired
status, the current job is registered as a dependant. The job processor
will continue to work on other pending tasks. When a job finishes it
notifies any pending dependants by re-adding them to the workerpool.

A per-job processor lock is necessary for rare cases where the same job
can be re-added twice.

There is no way to view waiting jobs at the moment, but I plan to
export this information to “gnt-debug locks”.

A so-called dependency manager takes care of managing waiting jobs and
keeping track of their status.

Unittests are included.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences