paulirwin commented on code in PR #1182:
URL: https://github.com/apache/lucenenet/pull/1182#discussion_r2551886149
##########
src/Lucene.Net.Replicator/ReplicationClient.cs:
##########
@@ -468,6 +695,25 @@ public virtual void UpdateNow()
}
}
+ /// <summary>
+ /// Executes the update operation asynchronously immediately,
regardless if an update thread is running or not.
+ /// </summary>
+ public virtual async Task UpdateNowAsync(CancellationToken
cancellationToken = default)
+ {
+ EnsureOpen();
+
+ // Acquire the same update lock to prevent concurrent updates
+ updateLock.Lock();
Review Comment:
This seems fine as far as I can tell, but unit tests should expose any
flaws. I'm working on tests now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]