Skip to content

Commit

Permalink
Let the BranchGraphSynchronizer optimistically assume that the branch…
Browse files Browse the repository at this point in the history
… graph is up-to-date, when it is created

* Only actually run the sync() method, if it has been informed that the branch graph is not up-to-date anymore before
  • Loading branch information
stefanhahmann committed Sep 17, 2024
1 parent d5ca945 commit de4832d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ public BranchGraphSynchronizer( final GraphListener< ?, ? > bg, final ReadLock r
this.bg = bg;
this.lock = readLock;
this.listeners = new Listeners.SynchronizedList<>();
this.uptodate = true;
}

public void sync()
{
if ( uptodate )
return;
lock.lock();
try
{
Expand Down

0 comments on commit de4832d

Please sign in to comment.