BUG: Lucene.Net.Core.Search.IndexSearcher: Implemented solution provided by 
Vincent Van Den Berghe. This doesn't fix all of the concurrency problem, but it 
does improve things somewhat.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/e103f24e
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/e103f24e
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/e103f24e

Branch: refs/heads/api-work
Commit: e103f24e78c322a23412bc9b2b8970b8f6e8e2ff
Parents: 7eeaca9
Author: Shad Storhaug <[email protected]>
Authored: Wed Mar 22 09:42:32 2017 +0700
Committer: Shad Storhaug <[email protected]>
Committed: Wed Mar 22 09:42:32 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Search/IndexSearcher.cs | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e103f24e/src/Lucene.Net.Core/Search/IndexSearcher.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/IndexSearcher.cs 
b/src/Lucene.Net.Core/Search/IndexSearcher.cs
index 8b90a8a..a1cc2a0 100644
--- a/src/Lucene.Net.Core/Search/IndexSearcher.cs
+++ b/src/Lucene.Net.Core/Search/IndexSearcher.cs
@@ -938,12 +938,15 @@ namespace Lucene.Net.Search
                 {
                     try
                     {
-                        current = service.Take().Result;
+                        var awaitable = service.Take();
+                        awaitable.Wait();
+                        current = awaitable.Result;
+
                     }
 #if !NETSTANDARD
-                    catch (System.Threading.ThreadInterruptedException)
+                    catch (System.Threading.ThreadInterruptedException e)
                     {
-                        throw;
+                        throw new 
System.Threading.ThreadInterruptedException(e.ToString(), e);
                     }
 #endif
                     catch (Exception e)

Reply via email to