paulirwin commented on code in PR #938:
URL: https://github.com/apache/lucenenet/pull/938#discussion_r1597694400
##########
src/Lucene.Net/Support/ConcurrentHashSet.cs:
##########
@@ -753,7 +753,16 @@ private void CopyToItems(T[] array, int index)
public void ExceptWith(IEnumerable<T> other)
{
- throw new NotImplementedException();
+ if (ReferenceEquals(this, other))
Review Comment:
Also by "synchronize around the entire hashset" I mean taking a lock around
not just the hashset but the operations that affect the files in the hashset
(i.e. DeleteFile, Sync, etc) - which could potentially be expensive in a highly
multithreaded app but would ensure that all files are fsynced when Sync is
called. The alternative is not caring about some possible fsync misses (which
appears to be the case with Java Lucene code, as it would have the same issues).
--
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]