Github user eladmarg commented on a diff in the pull request:
https://github.com/apache/lucenenet/pull/168#discussion_r60832114
--- Diff: src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs ---
@@ -657,7 +655,7 @@ public virtual void TestRollbackAndCommitWithThreads()
}
Assert.IsTrue(!failed.Get());
- writerRef.Value.Dispose();
+ writerRef.Dispose();
--- End diff --
@conniey great approach,
I would even use the ReaderWriterLockSlim in order to reduce the
performance penalty of locking. (in this way for reads only 1 thread can
access, and I'm not sure this is a must)
https://msdn.microsoft.com/en-us/library/system.threading.readerwriterlockslim.aspx
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---