IndexDiffCacheEntry: wait for workspace lock using begin/end rule
IndexDiffCacheEntry.waitForWorkspaceLock is used to synchronize
IndexDiff calculations with workspace changes. IndexDiff calculation is
started when the workspace can be locked.
The old implementation performed an empty Workspace.run to achieve this.
This could result in the state that Workspace.run acquires scheduling
rule workspace root and waits for OrderedLock because another thread is
broadcasting changes.
To avoid this blocking of workspace root waitForWorkspaceLock now avoids
calling Workspace.run. Instead JobManager().beginRule is used to wait.
Bug: 361758
Change-Id: I611f70c934aefe5993927fa2675325ba11dd5373
Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>