Skip to content
  • Michael Hanselmann's avatar
    Implement chained jobs · b95479a5
    Michael Hanselmann authored
    
    
    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: default avatarMichael Hanselmann <hansmi@google.com>
    Reviewed-by: default avatarIustin Pop <iustin@google.com>
    b95479a5