• Michael Hanselmann's avatar
    Fix locking issue with job dependencies · 75d81fc8
    Michael Hanselmann authored
    When jobs waiting for a dependency are notified, they're re-added to the
    queue. This would require owning the queue lock in exclusive mode, but
    since the function doing so is called from within the job/opcode
    processor, it only holds the lock in shared mode.
    This patch changes the result of the processor from a boolean to a
    status value (integer). This way the caller can be notified about
    actions to take, including notifying waiting jobs. The function adding
    jobs to the queue can now acquire the lock in exclusive mode.
    Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
    Reviewed-by: default avatarIustin Pop <iustin@google.com>
jqueue.py 70.8 KB