lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [17/45] lucenenet git commit: Moved all threading-related types from Support into Lucene.Net.Support.Threading namespace
Date Sun, 30 Apr 2017 21:55:56 GMT
Moved all threading-related types from Support into Lucene.Net.Support.Threading namespace


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

Branch: refs/heads/master
Commit: 00b95661914183b1189e0ce174edeb4d3e45b810
Parents: 3790185
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Apr 28 13:12:02 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Mon May 1 04:45:05 2017 +0700

----------------------------------------------------------------------
 .../Analysis/BaseTokenStreamTestCase.cs         |   1 +
 .../Index/BaseDocValuesFormatTestCase.cs        |  12 +-
 .../Index/BasePostingsFormatTestCase.cs         |   1 +
 .../Index/BaseStoredFieldsFormatTestCase.cs     |   9 +-
 .../Index/BaseTermVectorsFormatTestCase.cs      |  13 +-
 .../ThreadedIndexingAndSearchingTestCase.cs     |  18 +-
 .../Randomized/RandomizedContext.cs             |   1 +
 .../Randomized/Randomness.cs                    |   2 +-
 .../Randomized/SingleThreadedRandom.cs          |   1 +
 .../Search/ShardSearchingTestBase.cs            |   3 +-
 .../Util/LuceneTestCase.cs                      |   1 +
 .../Taxonomy/Directory/TestAddTaxonomy.cs       |  13 +-
 .../Directory/TestConcurrentFacetedIndexing.cs  |   1 +
 .../Directory/TestDirectoryTaxonomyWriter.cs    |  27 +-
 .../Taxonomy/TestCachedOrdinalsReader.cs        |   2 +-
 .../Taxonomy/TestSearcherTaxonomyManager.cs     |  23 +-
 .../Taxonomy/TestTaxonomyCombined.cs            |   9 +-
 .../Spell/TestSpellChecker.cs                   |   1 +
 .../Analyzing/AnalyzingInfixSuggesterTest.cs    |   1 +
 src/Lucene.Net.Tests/Index/TestAddIndexes.cs    |   1 +
 src/Lucene.Net.Tests/Index/TestAtomicUpdate.cs  |  17 +-
 .../Index/TestBagOfPositions.cs                 |  10 +-
 src/Lucene.Net.Tests/Index/TestBagOfPostings.cs |   8 +-
 .../Index/TestBinaryDocValuesUpdates.cs         |  11 +-
 src/Lucene.Net.Tests/Index/TestCodecs.cs        |   1 +
 .../Index/TestDirectoryReader.cs                |  14 +-
 .../Index/TestDirectoryReaderReopen.cs          |   5 +-
 .../Index/TestDocValuesIndexing.cs              |  12 +-
 .../Index/TestDocValuesWithThreads.cs           |  14 +-
 .../Index/TestDocumentsWriterDeleteQueue.cs     |   1 +
 .../Index/TestDocumentsWriterStallControl.cs    |   7 +-
 .../Index/TestFlushByRamOrCountsPolicy.cs       |  15 +-
 .../Index/TestForceMergeForever.cs              |   5 +-
 src/Lucene.Net.Tests/Index/TestIndexWriter.cs   |   9 +-
 .../Index/TestIndexWriterCommit.cs              |  13 +-
 .../Index/TestIndexWriterDelete.cs              |   1 +
 .../Index/TestIndexWriterExceptions.cs          |  13 +-
 .../Index/TestIndexWriterMerging.cs             |   9 +-
 .../Index/TestIndexWriterNRTIsCurrent.cs        |  11 +-
 .../Index/TestIndexWriterReader.cs              |  15 +-
 .../Index/TestIndexWriterWithThreads.cs         |   1 +
 .../Index/TestMixedDocValuesUpdates.cs          |  17 +-
 .../Index/TestNRTReaderWithThreads.cs           |   1 +
 src/Lucene.Net.Tests/Index/TestNeverDelete.cs   |   3 +-
 .../Index/TestNumericDocValuesUpdates.cs        |  18 +-
 src/Lucene.Net.Tests/Index/TestPayloads.cs      |  15 +-
 .../Index/TestRollingUpdates.cs                 |  16 +-
 .../Index/TestSnapshotDeletionPolicy.cs         |   7 +-
 .../Index/TestStressIndexing.cs                 |  16 +-
 .../Index/TestStressIndexing2.cs                |   1 +
 src/Lucene.Net.Tests/Index/TestStressNRT.cs     |   9 +-
 .../Index/TestThreadedForceMerge.cs             |   7 +-
 src/Lucene.Net.Tests/Index/TestTransactions.cs  |   9 +-
 src/Lucene.Net.Tests/Lucene.Net.Tests.csproj    |   4 +-
 .../Search/TestAutomatonQuery.cs                |   6 +-
 .../TestControlledRealTimeReopenThread.cs       |  27 +-
 src/Lucene.Net.Tests/Search/TestFieldCache.cs   |   1 +
 .../Search/TestIndexSearcher.cs                 |   2 +-
 .../Search/TestLiveFieldValues.cs               |   6 +-
 .../Search/TestMultiThreadTermVectors.cs        |   1 +
 .../Search/TestSameScoresWithThreads.cs         |   5 +-
 .../Search/TestSearchWithThreads.cs             |   9 +-
 .../Search/TestSearcherManager.cs               |   1 +
 .../Search/TestTimeLimitingCollector.cs         |   1 +
 src/Lucene.Net.Tests/Store/TestCopyBytes.cs     |   2 +-
 src/Lucene.Net.Tests/Store/TestDirectory.cs     |   1 +
 src/Lucene.Net.Tests/Store/TestLockFactory.cs   |   1 +
 src/Lucene.Net.Tests/Store/TestRAMDirectory.cs  |   1 +
 .../Support/TestCloseableThreadLocal.cs         | 113 -------
 src/Lucene.Net.Tests/Support/TestThreadClass.cs |  60 ----
 .../Threading/TestCloseableThreadLocal.cs       | 113 +++++++
 .../Support/Threading/TestThreadClass.cs        |  60 ++++
 .../TestWorstCaseTestBehavior.cs                |   2 +-
 .../Util/TestDoubleBarrelLRUCache.cs            |   2 +-
 src/Lucene.Net.Tests/Util/TestSetOnce.cs        |   2 +-
 .../Util/TestWeakIdentityMap.cs                 |   1 +
 .../Index/ConcurrentMergeScheduler.cs           |   2 +-
 .../Index/DocumentsWriterDeleteQueue.cs         |   1 +
 .../Index/DocumentsWriterFlushQueue.cs          |   1 +
 .../Index/DocumentsWriterPerThreadPool.cs       |   3 +-
 .../Index/DocumentsWriterStallControl.cs        |   1 +
 src/Lucene.Net/Index/TaskMergeScheduler.cs      |   2 +-
 src/Lucene.Net/Lucene.Net.csproj                |  22 +-
 .../Search/ControlledRealTimeReopenThread.cs    |   1 +
 src/Lucene.Net/Search/IndexSearcher.cs          |   1 +
 src/Lucene.Net/Search/ReferenceManager.cs       |   1 +
 src/Lucene.Net/Search/TimeLimitingCollector.cs  |   2 +-
 src/Lucene.Net/Store/LockVerifyServer.cs        |   2 +-
 .../Support/CloseableThreadLocalProfiler.cs     |  45 ---
 .../Support/Compatibility/ThreadLocal.cs        |  55 ---
 src/Lucene.Net/Support/ICompletionService.cs    |  32 --
 src/Lucene.Net/Support/IThreadRunnable.cs       |  36 --
 .../LimitedConcurrencyLevelTaskScheduler.cs     | 187 -----------
 .../Support/ReaderWriterLockSlimExtensions.cs   |  82 -----
 src/Lucene.Net/Support/ReentrantLock.cs         |  75 -----
 .../Support/TaskSchedulerCompletionService.cs   |  45 ---
 src/Lucene.Net/Support/ThreadClass.cs           | 331 -------------------
 src/Lucene.Net/Support/ThreadFactory.cs         |  32 --
 src/Lucene.Net/Support/ThreadLock.cs            |  83 -----
 .../Threading/CloseableThreadLocalProfiler.cs   |  45 +++
 .../Support/Threading/ICompletionService.cs     |  32 ++
 .../Support/Threading/IThreadRunnable.cs        |  36 ++
 .../LimitedConcurrencyLevelTaskScheduler.cs     | 187 +++++++++++
 .../Threading/ReaderWriterLockSlimExtensions.cs |  82 +++++
 .../Support/Threading/ReentrantLock.cs          |  75 +++++
 .../Threading/TaskSchedulerCompletionService.cs |  45 +++
 src/Lucene.Net/Support/Threading/ThreadClass.cs | 331 +++++++++++++++++++
 .../Support/Threading/ThreadFactory.cs          |  32 ++
 src/Lucene.Net/Support/Threading/ThreadLocal.cs |  55 +++
 src/Lucene.Net/Support/Threading/ThreadLock.cs  |  83 +++++
 110 files changed, 1483 insertions(+), 1434 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs b/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
index 43d39c3..177775e 100644
--- a/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Documents;
 using Lucene.Net.Index;
+using Lucene.Net.Support.Threading;
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
index d755e63..ecb2119 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
@@ -1,17 +1,17 @@
 using Lucene.Net.Documents;
 using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Search;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.Threading;
-using Lucene.Net.Search;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-
     /*
          * Licensed to the Apache Software Foundation (ASF) under one or more
          * contributor license agreements.  See the NOTICE file distributed with
@@ -31,7 +31,6 @@ namespace Lucene.Net.Index
 
     using Analyzer = Lucene.Net.Analysis.Analyzer;
     using BinaryDocValuesField = BinaryDocValuesField;
-    using IBits = Lucene.Net.Util.IBits;
     using BooleanClause = Lucene.Net.Search.BooleanClause;
     using BooleanQuery = Lucene.Net.Search.BooleanQuery;
     using BytesRef = Lucene.Net.Util.BytesRef;
@@ -39,7 +38,7 @@ namespace Lucene.Net.Index
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
     using Field = Field;
-    using SingleDocValuesField = SingleDocValuesField;
+    using IBits = Lucene.Net.Util.IBits;
     using IndexSearcher = Lucene.Net.Search.IndexSearcher;
     using Lucene42DocValuesFormat = Lucene.Net.Codecs.Lucene42.Lucene42DocValuesFormat;
     using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
@@ -47,6 +46,7 @@ namespace Lucene.Net.Index
     using Query = Lucene.Net.Search.Query;
     using ScoreDoc = Lucene.Net.Search.ScoreDoc;
     using SeekStatus = Lucene.Net.Index.TermsEnum.SeekStatus;
+    using SingleDocValuesField = SingleDocValuesField;
     using SortedDocValuesField = SortedDocValuesField;
     using SortedSetDocValuesField = SortedSetDocValuesField;
     using StoredField = StoredField;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
index 035ac8d..c4211ab 100644
--- a/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Documents;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
index 0fd043d..e5515ad 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
@@ -1,37 +1,31 @@
-using Lucene.Net.Attributes;
-using Lucene.Net.Codecs;
 using Lucene.Net.Codecs.SimpleText;
 using Lucene.Net.Documents;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Search;
 using Lucene.Net.Support;
-using Lucene.Net.Util;
+using Lucene.Net.Support.Threading;
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Globalization;
 using System.Linq;
 using System.Text;
-using System.Threading;
 
 namespace Lucene.Net.Index
 {
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Codec = Lucene.Net.Codecs.Codec;
     using Directory = Lucene.Net.Store.Directory;
-
     //using SimpleTextCodec = Lucene.Net.Codecs.simpletext.SimpleTextCodec;
     using Document = Documents.Document;
     using DoubleField = DoubleField;
     using Field = Field;
     using FieldType = FieldType;
-    using SingleField = SingleField;
     using IndexSearcher = Lucene.Net.Search.IndexSearcher;
     using Int32Field = Int32Field;
     using Int64Field = Int64Field;
     using Lucene46Codec = Lucene.Net.Codecs.Lucene46.Lucene46Codec;
     using MMapDirectory = Lucene.Net.Store.MMapDirectory;
-
     /*
          * Licensed to the Apache Software Foundation (ASF) under one or more
          * contributor license agreements.  See the NOTICE file distributed with
@@ -53,6 +47,7 @@ namespace Lucene.Net.Index
     using MockDirectoryWrapper = Lucene.Net.Store.MockDirectoryWrapper;
     using NumericRangeQuery = Lucene.Net.Search.NumericRangeQuery;
     using Query = Lucene.Net.Search.Query;
+    using SingleField = SingleField;
     using StoredField = StoredField;
     using StringField = StringField;
     using TermQuery = Lucene.Net.Search.TermQuery;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
index a039b40..4e07b4e 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
@@ -1,17 +1,18 @@
 using Lucene.Net.Analysis.TokenAttributes;
+using Lucene.Net.Attributes;
+using Lucene.Net.Codecs;
+using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Threading;
-using Lucene.Net.Attributes;
-using Lucene.Net.Codecs;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
     using Attribute = Lucene.Net.Util.Attribute;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using CharTermAttribute = Lucene.Net.Analysis.TokenAttributes.CharTermAttribute;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.TestFramework/Index/ThreadedIndexingAndSearchingTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/ThreadedIndexingAndSearchingTestCase.cs b/src/Lucene.Net.TestFramework/Index/ThreadedIndexingAndSearchingTestCase.cs
index 3d8e0ee..f386508 100644
--- a/src/Lucene.Net.TestFramework/Index/ThreadedIndexingAndSearchingTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/ThreadedIndexingAndSearchingTestCase.cs
@@ -1,31 +1,31 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Search;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
-using System.Collections.Generic;
 using System.Collections.Concurrent;
+using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
+using System.IO;
 using System.Linq;
 using System.Threading;
 using System.Threading.Tasks;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-    using Search;
-    using System.IO;
     using BaseDirectoryWrapper = Lucene.Net.Store.BaseDirectoryWrapper;
-    using IBits = Lucene.Net.Util.IBits;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
     using FailOnNonBulkMergesInfoStream = Lucene.Net.Util.FailOnNonBulkMergesInfoStream;
     using Field = Field;
+    using IBits = Lucene.Net.Util.IBits;
     using IndexSearcher = Lucene.Net.Search.IndexSearcher;
     using LineFileDocs = Lucene.Net.Util.LineFileDocs;
     using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
-
     /*
          * Licensed to the Apache Software Foundation (ASF) under one or more
          * contributor license agreements.  See the NOTICE file distributed with

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.TestFramework/Randomized/RandomizedContext.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Randomized/RandomizedContext.cs b/src/Lucene.Net.TestFramework/Randomized/RandomizedContext.cs
index 752ef32..e853f6a 100644
--- a/src/Lucene.Net.TestFramework/Randomized/RandomizedContext.cs
+++ b/src/Lucene.Net.TestFramework/Randomized/RandomizedContext.cs
@@ -16,6 +16,7 @@
  */
 
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using System;
 using System.Threading;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.TestFramework/Randomized/Randomness.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Randomized/Randomness.cs b/src/Lucene.Net.TestFramework/Randomized/Randomness.cs
index f2d6cd4..d3b3bd6 100644
--- a/src/Lucene.Net.TestFramework/Randomized/Randomness.cs
+++ b/src/Lucene.Net.TestFramework/Randomized/Randomness.cs
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using System;
 using System.Collections.Generic;
 using System.Linq;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.TestFramework/Randomized/SingleThreadedRandom.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Randomized/SingleThreadedRandom.cs b/src/Lucene.Net.TestFramework/Randomized/SingleThreadedRandom.cs
index c3c6cb3..09878f7 100644
--- a/src/Lucene.Net.TestFramework/Randomized/SingleThreadedRandom.cs
+++ b/src/Lucene.Net.TestFramework/Randomized/SingleThreadedRandom.cs
@@ -16,6 +16,7 @@
  */
 
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using System;
 using System.Diagnostics;
 using System.Threading;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.TestFramework/Search/ShardSearchingTestBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Search/ShardSearchingTestBase.cs b/src/Lucene.Net.TestFramework/Search/ShardSearchingTestBase.cs
index 5a4543d..dbcfc46 100644
--- a/src/Lucene.Net.TestFramework/Search/ShardSearchingTestBase.cs
+++ b/src/Lucene.Net.TestFramework/Search/ShardSearchingTestBase.cs
@@ -1,3 +1,5 @@
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
@@ -5,7 +7,6 @@ using System.Diagnostics;
 
 namespace Lucene.Net.Search
 {
-    using Lucene.Net.Support;
     using Directory = Lucene.Net.Store.Directory;
     using IndexReader = Lucene.Net.Index.IndexReader;
     using IndexWriter = Lucene.Net.Index.IndexWriter;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
index 146ae94..2796502 100644
--- a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
@@ -24,6 +24,7 @@ using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Search;
 using Lucene.Net.Support;
 using Lucene.Net.Support.IO;
+using Lucene.Net.Support.Threading;
 using Lucene.Net.TestFramework.Support;
 using Lucene.Net.Util.Automaton;
 using NUnit.Framework;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestAddTaxonomy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestAddTaxonomy.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestAddTaxonomy.cs
index 974913c..a6981a1 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestAddTaxonomy.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestAddTaxonomy.cs
@@ -1,21 +1,22 @@
-using System;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Threading;
 using System.Threading.Tasks;
-using Lucene.Net.Randomized.Generators;
-using Lucene.Net.Support;
-using NUnit.Framework;
 
 namespace Lucene.Net.Facet.Taxonomy.Directory
 {
 
 
+    using Directory = Lucene.Net.Store.Directory;
     using DiskOrdinalMap = Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.DiskOrdinalMap;
-    using MemoryOrdinalMap = Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.MemoryOrdinalMap;
     using IOrdinalMap = Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.IOrdinalMap;
-    using Directory = Lucene.Net.Store.Directory;
     using IOUtils = Lucene.Net.Util.IOUtils;
+    using MemoryOrdinalMap = Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.MemoryOrdinalMap;
     using TestUtil = Lucene.Net.Util.TestUtil;
 
     /*

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
index 0d08610..ee95b0d 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
@@ -3,6 +3,7 @@ using System.Collections.Concurrent;
 using System.IO;
 using System.Threading;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using NUnit.Framework;
 
 namespace Lucene.Net.Facet.Taxonomy.Directory

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
index 8225c0d..a8c3930 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
@@ -1,30 +1,31 @@
-using System;
-using System.Collections.Generic;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
+using System;
 using System.Collections.Concurrent;
+using System.Collections.Generic;
 using System.IO;
 using System.Threading;
-using Lucene.Net.Support;
-using NUnit.Framework;
 
 namespace Lucene.Net.Facet.Taxonomy.Directory
 {
 
 
-    using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
-    using Document = Lucene.Net.Documents.Document;
-    using MemoryOrdinalMap = Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.MemoryOrdinalMap;
-    using ITaxonomyWriterCache = Lucene.Net.Facet.Taxonomy.WriterCache.ITaxonomyWriterCache;
     using Cl2oTaxonomyWriterCache = Lucene.Net.Facet.Taxonomy.WriterCache.Cl2oTaxonomyWriterCache;
-    using LruTaxonomyWriterCache = Lucene.Net.Facet.Taxonomy.WriterCache.LruTaxonomyWriterCache;
+    using Directory = Lucene.Net.Store.Directory;
     using DirectoryReader = Lucene.Net.Index.DirectoryReader;
+    using Document = Lucene.Net.Documents.Document;
     using IndexReader = Lucene.Net.Index.IndexReader;
+    using IndexSearcher = Lucene.Net.Search.IndexSearcher;
     using IndexWriter = Lucene.Net.Index.IndexWriter;
-    using OpenMode = Lucene.Net.Index.OpenMode;
     using IndexWriterConfig = Lucene.Net.Index.IndexWriterConfig;
-    using SegmentInfos = Lucene.Net.Index.SegmentInfos;
-    using IndexSearcher = Lucene.Net.Search.IndexSearcher;
-    using Directory = Lucene.Net.Store.Directory;
     using IOUtils = Lucene.Net.Util.IOUtils;
+    using ITaxonomyWriterCache = Lucene.Net.Facet.Taxonomy.WriterCache.ITaxonomyWriterCache;
+    using LruTaxonomyWriterCache = Lucene.Net.Facet.Taxonomy.WriterCache.LruTaxonomyWriterCache;
+    using MemoryOrdinalMap = Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.MemoryOrdinalMap;
+    using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
+    using OpenMode = Lucene.Net.Index.OpenMode;
+    using SegmentInfos = Lucene.Net.Index.SegmentInfos;
     using TestUtil = Lucene.Net.Util.TestUtil;
 
     /*

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests.Facet/Taxonomy/TestCachedOrdinalsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestCachedOrdinalsReader.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestCachedOrdinalsReader.cs
index 66efa99..77aa338 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestCachedOrdinalsReader.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestCachedOrdinalsReader.cs
@@ -1,7 +1,7 @@
 using System;
 using System.IO;
 using System.Threading;
-using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using NUnit.Framework;
 
 namespace Lucene.Net.Facet.Taxonomy

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests.Facet/Taxonomy/TestSearcherTaxonomyManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestSearcherTaxonomyManager.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestSearcherTaxonomyManager.cs
index ddd08b2..a7ff6d6 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestSearcherTaxonomyManager.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestSearcherTaxonomyManager.cs
@@ -1,13 +1,14 @@
-using System;
+using Lucene.Net.Search;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Threading;
-using Lucene.Net.Support;
-using NUnit.Framework;
 
 namespace Lucene.Net.Facet.Taxonomy
 {
-
     /*
      * Licensed to the Apache Software Foundation (ASF) under one or more
      * contributor license agreements.  See the NOTICE file distributed with
@@ -26,18 +27,18 @@ namespace Lucene.Net.Facet.Taxonomy
      */
 
 
-    using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
-    using Document = Lucene.Net.Documents.Document;
-    using SearcherAndTaxonomy = Lucene.Net.Facet.Taxonomy.SearcherTaxonomyManager.SearcherAndTaxonomy;
+    
+    using Directory = Lucene.Net.Store.Directory;
     using DirectoryTaxonomyWriter = Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter;
+    using Document = Lucene.Net.Documents.Document;
     using IndexWriter = Lucene.Net.Index.IndexWriter;
     using IndexWriterConfig = Lucene.Net.Index.IndexWriterConfig;
-    using TieredMergePolicy = Lucene.Net.Index.TieredMergePolicy;
-    using MatchAllDocsQuery = Lucene.Net.Search.MatchAllDocsQuery;
-    using Lucene.Net.Search;
-    using Directory = Lucene.Net.Store.Directory;
     using IOUtils = Lucene.Net.Util.IOUtils;
+    using MatchAllDocsQuery = Lucene.Net.Search.MatchAllDocsQuery;
+    using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
+    using SearcherAndTaxonomy = Lucene.Net.Facet.Taxonomy.SearcherTaxonomyManager.SearcherAndTaxonomy;
     using TestUtil = Lucene.Net.Util.TestUtil;
+    using TieredMergePolicy = Lucene.Net.Index.TieredMergePolicy;
     [TestFixture]
     public class TestSearcherTaxonomyManager : FacetTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs
index f3a7725..b33ca50 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs
@@ -1,18 +1,19 @@
-using System;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Text;
 using System.Threading;
-using Lucene.Net.Support;
-using NUnit.Framework;
 
 namespace Lucene.Net.Facet.Taxonomy
 {
 
 
+    using Directory = Lucene.Net.Store.Directory;
     using DirectoryTaxonomyReader = Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader;
     using DirectoryTaxonomyWriter = Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter;
-    using Directory = Lucene.Net.Store.Directory;
     using LockObtainFailedException = Lucene.Net.Store.LockObtainFailedException;
     using RAMDirectory = Lucene.Net.Store.RAMDirectory;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests.Suggest/Spell/TestSpellChecker.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Suggest/Spell/TestSpellChecker.cs b/src/Lucene.Net.Tests.Suggest/Spell/TestSpellChecker.cs
index a659c05..624690f 100644
--- a/src/Lucene.Net.Tests.Suggest/Spell/TestSpellChecker.cs
+++ b/src/Lucene.Net.Tests.Suggest/Spell/TestSpellChecker.cs
@@ -3,6 +3,7 @@ using Lucene.Net.Documents;
 using Lucene.Net.Index;
 using Lucene.Net.Store;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using Lucene.Net.Util;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingInfixSuggesterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingInfixSuggesterTest.cs b/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingInfixSuggesterTest.cs
index f0a0f16..e2e813b 100644
--- a/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingInfixSuggesterTest.cs
+++ b/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingInfixSuggesterTest.cs
@@ -3,6 +3,7 @@ using Lucene.Net.Analysis.Core;
 using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Analysis.Util;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using Lucene.Net.Util;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestAddIndexes.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestAddIndexes.cs b/src/Lucene.Net.Tests/Index/TestAddIndexes.cs
index 27b87d4..ec53ddf 100644
--- a/src/Lucene.Net.Tests/Index/TestAddIndexes.cs
+++ b/src/Lucene.Net.Tests/Index/TestAddIndexes.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Codecs;
 using Lucene.Net.Documents;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestAtomicUpdate.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestAtomicUpdate.cs b/src/Lucene.Net.Tests/Index/TestAtomicUpdate.cs
index ebfa5ae..cadd1af 100644
--- a/src/Lucene.Net.Tests/Index/TestAtomicUpdate.cs
+++ b/src/Lucene.Net.Tests/Index/TestAtomicUpdate.cs
@@ -1,8 +1,12 @@
-using System;
-using System.IO;
-using System.Threading;
 using Lucene.Net.Attributes;
 using Lucene.Net.Documents;
+using Lucene.Net.Store;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using Lucene.Net.Util;
+using NUnit.Framework;
+using System;
+using System.Threading;
 
 namespace Lucene.Net.Index
 {
@@ -23,11 +27,6 @@ namespace Lucene.Net.Index
      * limitations under the License.
      */
 
-    using Lucene.Net.Store;
-    using Lucene.Net.Support;
-    using Lucene.Net.Util;
-    using NUnit.Framework;
-
     using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
 
     [TestFixture]
@@ -211,7 +210,7 @@ namespace Lucene.Net.Index
             }
 
             // Second in an FSDirectory:
-            DirectoryInfo dirPath = CreateTempDir("lucene.test.atomic");
+            System.IO.DirectoryInfo dirPath = CreateTempDir("lucene.test.atomic");
             using (directory = NewFSDirectory(dirPath))
             {
                 RunTest(directory);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestBagOfPositions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestBagOfPositions.cs b/src/Lucene.Net.Tests/Index/TestBagOfPositions.cs
index 43cfd4f..79b96ba 100644
--- a/src/Lucene.Net.Tests/Index/TestBagOfPositions.cs
+++ b/src/Lucene.Net.Tests/Index/TestBagOfPositions.cs
@@ -1,16 +1,16 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Text;
 using System.Threading;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-    using System.Threading;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestBagOfPostings.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestBagOfPostings.cs b/src/Lucene.Net.Tests/Index/TestBagOfPostings.cs
index 017454e..ec94bfe 100644
--- a/src/Lucene.Net.Tests/Index/TestBagOfPostings.cs
+++ b/src/Lucene.Net.Tests/Index/TestBagOfPostings.cs
@@ -1,15 +1,15 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Text;
 using System.Threading;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-    using System.Threading;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs b/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs
index bbf5364..7f6a817 100644
--- a/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs
+++ b/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs
@@ -1,24 +1,25 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
 using Lucene.Net.Attributes;
 using Lucene.Net.Codecs;
 using Lucene.Net.Documents;
-using Lucene.Net.Support;
 using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using NUnit.Framework;
+using System;
+using System.Collections.Generic;
 using System.IO;
+using System.Threading;
 
 namespace Lucene.Net.Index
 {
     using AssertingDocValuesFormat = Lucene.Net.Codecs.Asserting.AssertingDocValuesFormat;
     using BinaryDocValuesField = BinaryDocValuesField;
-    using IBits = Lucene.Net.Util.IBits;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Codec = Lucene.Net.Codecs.Codec;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
     using DocValuesFormat = Lucene.Net.Codecs.DocValuesFormat;
+    using IBits = Lucene.Net.Util.IBits;
     using IOUtils = Lucene.Net.Util.IOUtils;
     using Lucene40RWCodec = Lucene.Net.Codecs.Lucene40.Lucene40RWCodec;
     using Lucene41RWCodec = Lucene.Net.Codecs.Lucene41.Lucene41RWCodec;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestCodecs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestCodecs.cs b/src/Lucene.Net.Tests/Index/TestCodecs.cs
index d016bb0..9b45138 100644
--- a/src/Lucene.Net.Tests/Index/TestCodecs.cs
+++ b/src/Lucene.Net.Tests/Index/TestCodecs.cs
@@ -2,6 +2,7 @@ using Lucene.Net.Codecs.MockSep;
 using Lucene.Net.Documents;
 using Lucene.Net.Search;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestDirectoryReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestDirectoryReader.cs b/src/Lucene.Net.Tests/Index/TestDirectoryReader.cs
index a85e264..b59ad6f 100644
--- a/src/Lucene.Net.Tests/Index/TestDirectoryReader.cs
+++ b/src/Lucene.Net.Tests/Index/TestDirectoryReader.cs
@@ -1,25 +1,25 @@
+using Lucene.Net.Attributes;
+using Lucene.Net.Documents;
+using Lucene.Net.Search;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Threading;
-using Lucene.Net.Documents;
-using Lucene.Net.Search;
 
 namespace Lucene.Net.Index
 {
-    using Attributes;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-    using IBits = Lucene.Net.Util.IBits;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Directory = Lucene.Net.Store.Directory;
     using DocIdSetIterator = Lucene.Net.Search.DocIdSetIterator;
     using Document = Documents.Document;
     using Field = Field;
     using FieldType = FieldType;
+    using IBits = Lucene.Net.Util.IBits;
     using Lucene41PostingsFormat = Lucene.Net.Codecs.Lucene41.Lucene41PostingsFormat;
     using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
-
     /*
          * Licensed to the Apache Software Foundation (ASF) under one or more
          * contributor license agreements.  See the NOTICE file distributed with

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestDirectoryReaderReopen.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestDirectoryReaderReopen.cs b/src/Lucene.Net.Tests/Index/TestDirectoryReaderReopen.cs
index d5d6ec8..54690b7 100644
--- a/src/Lucene.Net.Tests/Index/TestDirectoryReaderReopen.cs
+++ b/src/Lucene.Net.Tests/Index/TestDirectoryReaderReopen.cs
@@ -1,4 +1,7 @@
 using Lucene.Net.Documents;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Text;
@@ -6,8 +9,6 @@ using System.Threading;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Support;
-    using NUnit.Framework;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
     using Field = Field;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestDocValuesIndexing.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestDocValuesIndexing.cs b/src/Lucene.Net.Tests/Index/TestDocValuesIndexing.cs
index 3b91a0f..99c48e2 100644
--- a/src/Lucene.Net.Tests/Index/TestDocValuesIndexing.cs
+++ b/src/Lucene.Net.Tests/Index/TestDocValuesIndexing.cs
@@ -1,13 +1,13 @@
-using System;
-using System.Threading;
 using Lucene.Net.Documents;
 using Lucene.Net.Search;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
+using System;
+using System.Threading;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-    using System.Threading;
     /*
          * Licensed to the Apache Software Foundation (ASF) under one or more
          * contributor license agreements.  See the NOTICE file distributed with
@@ -27,11 +27,11 @@ namespace Lucene.Net.Index
 
     using Analyzer = Lucene.Net.Analysis.Analyzer;
     using BinaryDocValuesField = BinaryDocValuesField;
-    using IBits = Lucene.Net.Util.IBits;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
     using Field = Field;
+    using IBits = Lucene.Net.Util.IBits;
     using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
     using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
     using NumericDocValuesField = NumericDocValuesField;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestDocValuesWithThreads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestDocValuesWithThreads.cs b/src/Lucene.Net.Tests/Index/TestDocValuesWithThreads.cs
index dbd6601..a5193e0 100644
--- a/src/Lucene.Net.Tests/Index/TestDocValuesWithThreads.cs
+++ b/src/Lucene.Net.Tests/Index/TestDocValuesWithThreads.cs
@@ -1,16 +1,16 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Search;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Threading;
-using Lucene.Net.Documents;
-using Lucene.Net.Search;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-    using System.IO;
-    using System.Threading;
     using BinaryDocValuesField = BinaryDocValuesField;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Directory = Lucene.Net.Store.Directory;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestDocumentsWriterDeleteQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestDocumentsWriterDeleteQueue.cs b/src/Lucene.Net.Tests/Index/TestDocumentsWriterDeleteQueue.cs
index b8de01b..b027098 100644
--- a/src/Lucene.Net.Tests/Index/TestDocumentsWriterDeleteQueue.cs
+++ b/src/Lucene.Net.Tests/Index/TestDocumentsWriterDeleteQueue.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Search;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using NUnit.Framework;
 using System;
 using System.Collections;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestDocumentsWriterStallControl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestDocumentsWriterStallControl.cs b/src/Lucene.Net.Tests/Index/TestDocumentsWriterStallControl.cs
index 9459fca..923d9b5 100644
--- a/src/Lucene.Net.Tests/Index/TestDocumentsWriterStallControl.cs
+++ b/src/Lucene.Net.Tests/Index/TestDocumentsWriterStallControl.cs
@@ -1,12 +1,13 @@
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Threading;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
     /*
              * Licensed to the Apache Software Foundation (ASF) under one or more
              * contributor license agreements. See the NOTICE file distributed with this

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestFlushByRamOrCountsPolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestFlushByRamOrCountsPolicy.cs b/src/Lucene.Net.Tests/Index/TestFlushByRamOrCountsPolicy.cs
index 12f8be3..481978d 100644
--- a/src/Lucene.Net.Tests/Index/TestFlushByRamOrCountsPolicy.cs
+++ b/src/Lucene.Net.Tests/Index/TestFlushByRamOrCountsPolicy.cs
@@ -1,9 +1,11 @@
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Index
 {
-
     /*
      * Licensed to the Apache Software Foundation (ASF) under one or more
      * contributor license agreements.  See the NOTICE file distributed with
@@ -22,16 +24,15 @@ namespace Lucene.Net.Index
      */
 
 
-    using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
-    using Document = Lucene.Net.Documents.Document;
-    using ThreadState = Lucene.Net.Index.DocumentsWriterPerThreadPool.ThreadState;
     using Directory = Lucene.Net.Store.Directory;
-    using MockDirectoryWrapper = Lucene.Net.Store.MockDirectoryWrapper;
+    using Document = Lucene.Net.Documents.Document;
     using LineFileDocs = Lucene.Net.Util.LineFileDocs;
     using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
+    using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
+    using MockDirectoryWrapper = Lucene.Net.Store.MockDirectoryWrapper;
     using TestUtil = Lucene.Net.Util.TestUtil;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
+    using ThreadState = Lucene.Net.Index.DocumentsWriterPerThreadPool.ThreadState;
+    
 
     [TestFixture]
     public class TestFlushByRamOrCountsPolicy : LuceneTestCase 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestForceMergeForever.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestForceMergeForever.cs b/src/Lucene.Net.Tests/Index/TestForceMergeForever.cs
index 742e032..9e98270 100644
--- a/src/Lucene.Net.Tests/Index/TestForceMergeForever.cs
+++ b/src/Lucene.Net.Tests/Index/TestForceMergeForever.cs
@@ -1,9 +1,10 @@
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Support;
-    using NUnit.Framework;
     using Directory = Lucene.Net.Store.Directory;
     using LineFileDocs = Lucene.Net.Util.LineFileDocs;
     using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriter.cs b/src/Lucene.Net.Tests/Index/TestIndexWriter.cs
index 502c143..201bf33 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriter.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriter.cs
@@ -1,11 +1,11 @@
 using Lucene.Net.Analysis.TokenAttributes;
+using Lucene.Net.Documents;
+using Lucene.Net.Search;
+using Lucene.Net.Support.Threading;
 using System;
 using System.Collections.Generic;
 using System.Text;
 using System.Threading;
-using Lucene.Net.Documents;
-using Lucene.Net.Search;
-using Lucene.Net.Support;
 
 namespace Lucene.Net.Index
 {
@@ -36,10 +36,8 @@ namespace Lucene.Net.Index
     using Automaton = Lucene.Net.Util.Automaton.Automaton;
     using BaseDirectoryWrapper = Lucene.Net.Store.BaseDirectoryWrapper;
     using BasicAutomata = Lucene.Net.Util.Automaton.BasicAutomata;
-
     //using SimpleTextCodec = Lucene.Net.Codecs.simpletext.SimpleTextCodec;
     using BinaryDocValuesField = BinaryDocValuesField;
-    using IBits = Lucene.Net.Util.IBits;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using CharacterRunAutomaton = Lucene.Net.Util.Automaton.CharacterRunAutomaton;
     using CharTermAttribute = Lucene.Net.Analysis.TokenAttributes.CharTermAttribute;
@@ -49,6 +47,7 @@ namespace Lucene.Net.Index
     using Document = Documents.Document;
     using Field = Field;
     using FieldType = FieldType;
+    using IBits = Lucene.Net.Util.IBits;
     using IndexOutput = Lucene.Net.Store.IndexOutput;
     using IndexSearcher = Lucene.Net.Search.IndexSearcher;
     using IOContext = Lucene.Net.Store.IOContext;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestIndexWriterCommit.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterCommit.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterCommit.cs
index 3d8a490..53a3229 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterCommit.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterCommit.cs
@@ -1,6 +1,12 @@
+using Lucene.Net.Analysis;
+using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
-using Lucene.Net.Documents;
+using System.IO;
 
 namespace Lucene.Net.Index
 {
@@ -21,11 +27,6 @@ namespace Lucene.Net.Index
      * limitations under the License.
      */
 
-    using Lucene.Net.Analysis;
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-    using System.IO;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
     using Field = Field;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestIndexWriterDelete.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterDelete.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterDelete.cs
index 595f040..fa64b75 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterDelete.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterDelete.cs
@@ -4,6 +4,7 @@ using Lucene.Net.Documents;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
 using Lucene.Net.Support.IO;
+using Lucene.Net.Support.Threading;
 using Lucene.Net.Util;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
index bad1448..6733d2f 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
@@ -1,14 +1,15 @@
 using Lucene.Net.Analysis;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Threading;
 using Lucene.Net.Documents;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using Lucene.Net.Util;
 using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
 using System.IO;
-using Lucene.Net.Util;
+using System.Threading;
 
 namespace Lucene.Net.Index
 {
@@ -32,7 +33,6 @@ namespace Lucene.Net.Index
     using Analyzer = Lucene.Net.Analysis.Analyzer;
     using BaseDirectoryWrapper = Lucene.Net.Store.BaseDirectoryWrapper;
     using BinaryDocValuesField = BinaryDocValuesField;
-    using IBits = Lucene.Net.Util.IBits;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using CannedTokenStream = Lucene.Net.Analysis.CannedTokenStream;
     using Directory = Lucene.Net.Store.Directory;
@@ -40,6 +40,7 @@ namespace Lucene.Net.Index
     using Document = Documents.Document;
     using Field = Field;
     using FieldType = FieldType;
+    using IBits = Lucene.Net.Util.IBits;
     using IndexInput = Lucene.Net.Store.IndexInput;
     using IndexOutput = Lucene.Net.Store.IndexOutput;
     using IndexSearcher = Lucene.Net.Search.IndexSearcher;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestIndexWriterMerging.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterMerging.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterMerging.cs
index 0e1bd31..fb381ee 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterMerging.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterMerging.cs
@@ -1,8 +1,12 @@
+using Lucene.Net.Attributes;
+using Lucene.Net.Documents;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Threading;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
@@ -23,9 +27,6 @@ namespace Lucene.Net.Index
      * limitations under the License.
      */
 
-    using Attributes;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
     using Field = Field;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestIndexWriterNRTIsCurrent.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterNRTIsCurrent.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterNRTIsCurrent.cs
index 9c302ca..50a1ade 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterNRTIsCurrent.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterNRTIsCurrent.cs
@@ -1,13 +1,14 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
+using System.IO;
 using System.Threading;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-    using System.IO;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestIndexWriterReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterReader.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterReader.cs
index 3d626cb..8bfa64e 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterReader.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterReader.cs
@@ -1,9 +1,15 @@
+using Lucene.Net.Attributes;
+using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using Lucene.Net.Util;
+using NUnit.Framework;
 using System;
+using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Threading;
-using Lucene.Net.Attributes;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
@@ -24,11 +30,6 @@ namespace Lucene.Net.Index
      * limitations under the License.
      */
 
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-    using System.Collections.Concurrent;
-    using Util;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Codec = Lucene.Net.Codecs.Codec;
     using Directory = Lucene.Net.Store.Directory;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestIndexWriterWithThreads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterWithThreads.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterWithThreads.cs
index f7946f1..8b488d7 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterWithThreads.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterWithThreads.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Documents;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using Lucene.Net.Util;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestMixedDocValuesUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestMixedDocValuesUpdates.cs b/src/Lucene.Net.Tests/Index/TestMixedDocValuesUpdates.cs
index 459479f..ddfd858 100644
--- a/src/Lucene.Net.Tests/Index/TestMixedDocValuesUpdates.cs
+++ b/src/Lucene.Net.Tests/Index/TestMixedDocValuesUpdates.cs
@@ -1,19 +1,21 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
-using System.Threading;
 using System.Collections.Generic;
-using Lucene.Net.Documents;
+using System.IO;
+using System.Threading;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-    using System.IO;
+    using Attributes;
     using BinaryDocValuesField = BinaryDocValuesField;
-    using IBits = Lucene.Net.Util.IBits;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
+    using IBits = Lucene.Net.Util.IBits;
     using IOUtils = Lucene.Net.Util.IOUtils;
     using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
     using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
@@ -21,7 +23,6 @@ namespace Lucene.Net.Index
     using Store = Field.Store;
     using StringField = StringField;
     using TestUtil = Lucene.Net.Util.TestUtil;
-    using Attributes;
 
     /*
      * Licensed to the Apache Software Foundation (ASF) under one or more

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestNRTReaderWithThreads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestNRTReaderWithThreads.cs b/src/Lucene.Net.Tests/Index/TestNRTReaderWithThreads.cs
index 5111a2c..94aa3a0 100644
--- a/src/Lucene.Net.Tests/Index/TestNRTReaderWithThreads.cs
+++ b/src/Lucene.Net.Tests/Index/TestNRTReaderWithThreads.cs
@@ -1,6 +1,7 @@
 using NUnit.Framework;
 using Lucene.Net.Attributes;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using System;
 using System.Threading;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestNeverDelete.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestNeverDelete.cs b/src/Lucene.Net.Tests/Index/TestNeverDelete.cs
index 572182c..04f6c01 100644
--- a/src/Lucene.Net.Tests/Index/TestNeverDelete.cs
+++ b/src/Lucene.Net.Tests/Index/TestNeverDelete.cs
@@ -1,4 +1,6 @@
 using Lucene.Net.Documents;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;
@@ -7,7 +9,6 @@ using System.Threading;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Support;
     using BaseDirectoryWrapper = Lucene.Net.Store.BaseDirectoryWrapper;
     using Document = Documents.Document;
     using Field = Field;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestNumericDocValuesUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestNumericDocValuesUpdates.cs b/src/Lucene.Net.Tests/Index/TestNumericDocValuesUpdates.cs
index c623571..9a0dee7 100644
--- a/src/Lucene.Net.Tests/Index/TestNumericDocValuesUpdates.cs
+++ b/src/Lucene.Net.Tests/Index/TestNumericDocValuesUpdates.cs
@@ -1,23 +1,25 @@
+using Lucene.Net.Attributes;
+using Lucene.Net.Codecs;
+using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Threading;
-using Lucene.Net.Codecs;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-    using System.IO;
     using AssertingDocValuesFormat = Lucene.Net.Codecs.Asserting.AssertingDocValuesFormat;
     using BinaryDocValuesField = BinaryDocValuesField;
-    using IBits = Lucene.Net.Util.IBits;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Codec = Lucene.Net.Codecs.Codec;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
     using DocValuesFormat = Lucene.Net.Codecs.DocValuesFormat;
+    using IBits = Lucene.Net.Util.IBits;
     using IOUtils = Lucene.Net.Util.IOUtils;
     using Lucene40RWCodec = Lucene.Net.Codecs.Lucene40.Lucene40RWCodec;
     using Lucene41RWCodec = Lucene.Net.Codecs.Lucene41.Lucene41RWCodec;
@@ -34,7 +36,7 @@ namespace Lucene.Net.Index
     using Store = Field.Store;
     using StringField = StringField;
     using TestUtil = Lucene.Net.Util.TestUtil;
-    using Attributes;
+    
 
     /*
      * Licensed to the Apache Software Foundation (ASF) under one or more

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestPayloads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestPayloads.cs b/src/Lucene.Net.Tests/Index/TestPayloads.cs
index 9ce5cff..fb129f4 100644
--- a/src/Lucene.Net.Tests/Index/TestPayloads.cs
+++ b/src/Lucene.Net.Tests/Index/TestPayloads.cs
@@ -1,9 +1,15 @@
+using Lucene.Net.Analysis;
 using Lucene.Net.Analysis.TokenAttributes;
+using Lucene.Net.Documents;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using Lucene.Net.Util;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.IO;
 using System.Text;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
@@ -24,17 +30,12 @@ namespace Lucene.Net.Index
      * limitations under the License.
      */
 
-    using Lucene.Net.Analysis;
-    using Lucene.Net.Support;
-    using Lucene.Net.Util;
-    using NUnit.Framework;
-    using System.IO;
-    using IBits = Lucene.Net.Util.IBits;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Directory = Lucene.Net.Store.Directory;
     using DocIdSetIterator = Lucene.Net.Search.DocIdSetIterator;
     using Document = Documents.Document;
     using Field = Field;
+    using IBits = Lucene.Net.Util.IBits;
     using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
     using PayloadAttribute = Lucene.Net.Analysis.TokenAttributes.PayloadAttribute;
     using TestUtil = Lucene.Net.Util.TestUtil;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestRollingUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestRollingUpdates.cs b/src/Lucene.Net.Tests/Index/TestRollingUpdates.cs
index 9379a32..847dc31 100644
--- a/src/Lucene.Net.Tests/Index/TestRollingUpdates.cs
+++ b/src/Lucene.Net.Tests/Index/TestRollingUpdates.cs
@@ -1,16 +1,16 @@
-using System;
+using Lucene.Net.Codecs.Memory;
 using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Store;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using Lucene.Net.Util;
+using NUnit.Framework;
+using System;
 
 namespace Lucene.Net.Index
 {
-    using Codecs.Memory;
     //using MemoryPostingsFormat = Lucene.Net.Codecs.memory.MemoryPostingsFormat;
-
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Store;
-    using Lucene.Net.Support;
-    using Lucene.Net.Util;
-    using NUnit.Framework;
     using Codec = Lucene.Net.Codecs.Codec;
     using IndexSearcher = Lucene.Net.Search.IndexSearcher;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestSnapshotDeletionPolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestSnapshotDeletionPolicy.cs b/src/Lucene.Net.Tests/Index/TestSnapshotDeletionPolicy.cs
index 3fb56f6..6fb3f7f 100644
--- a/src/Lucene.Net.Tests/Index/TestSnapshotDeletionPolicy.cs
+++ b/src/Lucene.Net.Tests/Index/TestSnapshotDeletionPolicy.cs
@@ -1,12 +1,13 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Threading;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Support;
-    using NUnit.Framework;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
     using FieldType = FieldType;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestStressIndexing.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestStressIndexing.cs b/src/Lucene.Net.Tests/Index/TestStressIndexing.cs
index 5f6503c..4fa59a2 100644
--- a/src/Lucene.Net.Tests/Index/TestStressIndexing.cs
+++ b/src/Lucene.Net.Tests/Index/TestStressIndexing.cs
@@ -1,7 +1,13 @@
-using System;
-using System.Threading;
 using Lucene.Net.Attributes;
 using Lucene.Net.Documents;
+using Lucene.Net.Search;
+using Lucene.Net.Store;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using Lucene.Net.Util;
+using NUnit.Framework;
+using System;
+using System.Threading;
 
 namespace Lucene.Net.Index
 {
@@ -22,12 +28,6 @@ namespace Lucene.Net.Index
      * limitations under the License.
      */
 
-    using Lucene.Net.Search;
-    using Lucene.Net.Store;
-    using Lucene.Net.Support;
-
-    using Lucene.Net.Util;
-    using NUnit.Framework;
     using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
 
     [TestFixture]

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestStressIndexing2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestStressIndexing2.cs b/src/Lucene.Net.Tests/Index/TestStressIndexing2.cs
index 4ec2f82..17fc7a3 100644
--- a/src/Lucene.Net.Tests/Index/TestStressIndexing2.cs
+++ b/src/Lucene.Net.Tests/Index/TestStressIndexing2.cs
@@ -2,6 +2,7 @@ using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Documents;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using Lucene.Net.Util;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestStressNRT.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestStressNRT.cs b/src/Lucene.Net.Tests/Index/TestStressNRT.cs
index b9d52cb..2509d28 100644
--- a/src/Lucene.Net.Tests/Index/TestStressNRT.cs
+++ b/src/Lucene.Net.Tests/Index/TestStressNRT.cs
@@ -1,15 +1,16 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Threading;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
     using FieldType = FieldType;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestThreadedForceMerge.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestThreadedForceMerge.cs b/src/Lucene.Net.Tests/Index/TestThreadedForceMerge.cs
index e4e2d59..a0109a5 100644
--- a/src/Lucene.Net.Tests/Index/TestThreadedForceMerge.cs
+++ b/src/Lucene.Net.Tests/Index/TestThreadedForceMerge.cs
@@ -1,11 +1,12 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Threading;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Support;
-    using NUnit.Framework;
     using Analyzer = Lucene.Net.Analysis.Analyzer;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Index/TestTransactions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestTransactions.cs b/src/Lucene.Net.Tests/Index/TestTransactions.cs
index 0f1c82b..0bce2f8 100644
--- a/src/Lucene.Net.Tests/Index/TestTransactions.cs
+++ b/src/Lucene.Net.Tests/Index/TestTransactions.cs
@@ -1,12 +1,13 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
+using System.IO;
 using System.Threading;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Index
 {
-    using Lucene.Net.Support;
-    using NUnit.Framework;
-    using System.IO;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
     using English = Lucene.Net.Util.English;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
index 492a503..bdf8b46 100644
--- a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
+++ b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
@@ -517,7 +517,7 @@
     <Compile Include="Support\Codecs\TestDefaultPostingsFormatFactory.cs" />
     <Compile Include="Support\CollisionTester.cs" />
     <Compile Include="Support\SmallObject.cs" />
-    <Compile Include="Support\TestCloseableThreadLocal.cs" />
+    <Compile Include="Support\Threading\TestCloseableThreadLocal.cs" />
     <Compile Include="Support\TestCollections.cs" />
     <Compile Include="Support\TestEquatableList.cs" />
     <Compile Include="Support\TestEquatableSet.cs" />
@@ -537,7 +537,7 @@
     <Compile Include="Support\TestSerialization.cs" />
     <Compile Include="Support\TestStringBuilderExtensions.cs" />
     <Compile Include="Support\TestCRC32.cs" />
-    <Compile Include="Support\TestThreadClass.cs" />
+    <Compile Include="Support\Threading\TestThreadClass.cs" />
     <Compile Include="Support\TestTreeDictionary.cs" />
     <Compile Include="Support\TestTreeSet.cs" />
     <Compile Include="Support\TestWeakDictionary.cs" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Search/TestAutomatonQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestAutomatonQuery.cs b/src/Lucene.Net.Tests/Search/TestAutomatonQuery.cs
index 0eeb5f9..cbfa7aa 100644
--- a/src/Lucene.Net.Tests/Search/TestAutomatonQuery.cs
+++ b/src/Lucene.Net.Tests/Search/TestAutomatonQuery.cs
@@ -1,12 +1,12 @@
+using Lucene.Net.Attributes;
 using Lucene.Net.Documents;
-using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Threading;
 
 namespace Lucene.Net.Search
 {
-    using Attributes;
-    using NUnit.Framework;
     using Automaton = Lucene.Net.Util.Automaton.Automaton;
     using AutomatonTestUtil = Lucene.Net.Util.Automaton.AutomatonTestUtil;
     using BasicAutomata = Lucene.Net.Util.Automaton.BasicAutomata;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs b/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs
index ef3f1b4..8ce1937 100644
--- a/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs
+++ b/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs
@@ -1,13 +1,14 @@
+using Lucene.Net.Attributes;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
-using Lucene.Net.Attributes;
-using Lucene.Net.Randomized.Generators;
-using Lucene.Net.Support;
-using NUnit.Framework;
 
 namespace Lucene.Net.Search
 {
@@ -29,29 +30,29 @@ namespace Lucene.Net.Search
      */
 
     using Analyzer = Lucene.Net.Analysis.Analyzer;
-    using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
+    using Directory = Lucene.Net.Store.Directory;
+    using DirectoryReader = Lucene.Net.Index.DirectoryReader;
     using Document = Lucene.Net.Documents.Document;
     using Field = Lucene.Net.Documents.Field;
-    using TextField = Lucene.Net.Documents.TextField;
-    using DirectoryReader = Lucene.Net.Index.DirectoryReader;
+    using IIndexableField = Lucene.Net.Index.IIndexableField;
     using IndexCommit = Lucene.Net.Index.IndexCommit;
     using IndexReader = Lucene.Net.Index.IndexReader;
     using IndexWriter = Lucene.Net.Index.IndexWriter;
     using IndexWriterConfig = Lucene.Net.Index.IndexWriterConfig;
-    using IIndexableField = Lucene.Net.Index.IIndexableField;
+    using IOUtils = Lucene.Net.Util.IOUtils;
     using KeepOnlyLastCommitDeletionPolicy = Lucene.Net.Index.KeepOnlyLastCommitDeletionPolicy;
+    using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
+    using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
     using NoMergePolicy = Lucene.Net.Index.NoMergePolicy;
+    using NRTCachingDirectory = Lucene.Net.Store.NRTCachingDirectory;
     using OpenMode = Lucene.Net.Index.OpenMode;
     using RandomIndexWriter = Lucene.Net.Index.RandomIndexWriter;
     using SnapshotDeletionPolicy = Lucene.Net.Index.SnapshotDeletionPolicy;
     using Term = Lucene.Net.Index.Term;
+    using TestUtil = Lucene.Net.Util.TestUtil;
+    using TextField = Lucene.Net.Documents.TextField;
     using ThreadedIndexingAndSearchingTestCase = Lucene.Net.Index.ThreadedIndexingAndSearchingTestCase;
     using TrackingIndexWriter = Lucene.Net.Index.TrackingIndexWriter;
-    using Directory = Lucene.Net.Store.Directory;
-    using NRTCachingDirectory = Lucene.Net.Store.NRTCachingDirectory;
-    using IOUtils = Lucene.Net.Util.IOUtils;
-    using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
-    using TestUtil = Lucene.Net.Util.TestUtil;
     //using ThreadInterruptedException = Lucene.Net.Util.ThreadInterruptedException;
     using Version = Lucene.Net.Util.LuceneVersion;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Search/TestFieldCache.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestFieldCache.cs b/src/Lucene.Net.Tests/Search/TestFieldCache.cs
index ac76518..3dab2cc 100644
--- a/src/Lucene.Net.Tests/Search/TestFieldCache.cs
+++ b/src/Lucene.Net.Tests/Search/TestFieldCache.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using Lucene.Net.Util;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Search/TestIndexSearcher.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestIndexSearcher.cs b/src/Lucene.Net.Tests/Search/TestIndexSearcher.cs
index d3344d2..c2456ba 100644
--- a/src/Lucene.Net.Tests/Search/TestIndexSearcher.cs
+++ b/src/Lucene.Net.Tests/Search/TestIndexSearcher.cs
@@ -1,6 +1,6 @@
 using Lucene.Net.Documents;
 using Lucene.Net.Index;
-using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using Lucene.Net.Util;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Search/TestLiveFieldValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestLiveFieldValues.cs b/src/Lucene.Net.Tests/Search/TestLiveFieldValues.cs
index 9cd902c..bdf3ecf 100644
--- a/src/Lucene.Net.Tests/Search/TestLiveFieldValues.cs
+++ b/src/Lucene.Net.Tests/Search/TestLiveFieldValues.cs
@@ -1,5 +1,7 @@
 using Lucene.Net.Documents;
-using Lucene.Net.Support;
+using Lucene.Net.Index;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Globalization;
@@ -7,8 +9,6 @@ using System.Threading;
 
 namespace Lucene.Net.Search
 {
-    using Index;
-    using NUnit.Framework;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;
     using Field = Field;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Search/TestMultiThreadTermVectors.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestMultiThreadTermVectors.cs b/src/Lucene.Net.Tests/Search/TestMultiThreadTermVectors.cs
index 89607cf..d617a22 100644
--- a/src/Lucene.Net.Tests/Search/TestMultiThreadTermVectors.cs
+++ b/src/Lucene.Net.Tests/Search/TestMultiThreadTermVectors.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Documents;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using System;
 using System.Diagnostics;
 using System.Text;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Search/TestSameScoresWithThreads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestSameScoresWithThreads.cs b/src/Lucene.Net.Tests/Search/TestSameScoresWithThreads.cs
index 361e17e..1f1edcb 100644
--- a/src/Lucene.Net.Tests/Search/TestSameScoresWithThreads.cs
+++ b/src/Lucene.Net.Tests/Search/TestSameScoresWithThreads.cs
@@ -1,11 +1,12 @@
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Threading;
 
 namespace Lucene.Net.Search
 {
-    using Lucene.Net.Support;
-    using NUnit.Framework;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Directory = Lucene.Net.Store.Directory;
     using Document = Documents.Document;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Search/TestSearchWithThreads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestSearchWithThreads.cs b/src/Lucene.Net.Tests/Search/TestSearchWithThreads.cs
index 1ce0552..50eb037 100644
--- a/src/Lucene.Net.Tests/Search/TestSearchWithThreads.cs
+++ b/src/Lucene.Net.Tests/Search/TestSearchWithThreads.cs
@@ -1,12 +1,13 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
+using NUnit.Framework;
 using System;
 using System.Text;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Search
 {
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
     using Directory = Lucene.Net.Store.Directory;
 
     /*

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Search/TestSearcherManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestSearcherManager.cs b/src/Lucene.Net.Tests/Search/TestSearcherManager.cs
index 2f53d74..243e421 100644
--- a/src/Lucene.Net.Tests/Search/TestSearcherManager.cs
+++ b/src/Lucene.Net.Tests/Search/TestSearcherManager.cs
@@ -3,6 +3,7 @@ using Lucene.Net.Attributes;
 using Lucene.Net.Index;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using System;
 using System.Collections.Generic;
 using System.Threading;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Search/TestTimeLimitingCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestTimeLimitingCollector.cs b/src/Lucene.Net.Tests/Search/TestTimeLimitingCollector.cs
index f500ce2..dda1ac7 100644
--- a/src/Lucene.Net.Tests/Search/TestTimeLimitingCollector.cs
+++ b/src/Lucene.Net.Tests/Search/TestTimeLimitingCollector.cs
@@ -3,6 +3,7 @@ using Lucene.Net.Documents;
 using Lucene.Net.Index;
 using Lucene.Net.Store;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using Lucene.Net.Util;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Store/TestCopyBytes.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Store/TestCopyBytes.cs b/src/Lucene.Net.Tests/Store/TestCopyBytes.cs
index c5bf9cd..653555d 100644
--- a/src/Lucene.Net.Tests/Store/TestCopyBytes.cs
+++ b/src/Lucene.Net.Tests/Store/TestCopyBytes.cs
@@ -1,6 +1,6 @@
 using Lucene.Net.Attributes;
 using Lucene.Net.Randomized.Generators;
-using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using NUnit.Framework;
 using System;
 using System.IO;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Store/TestDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Store/TestDirectory.cs b/src/Lucene.Net.Tests/Store/TestDirectory.cs
index 735a5c5..e796640 100644
--- a/src/Lucene.Net.Tests/Store/TestDirectory.cs
+++ b/src/Lucene.Net.Tests/Store/TestDirectory.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Attributes;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using Lucene.Net.Util;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Store/TestLockFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Store/TestLockFactory.cs b/src/Lucene.Net.Tests/Store/TestLockFactory.cs
index 8964277..918e55c 100644
--- a/src/Lucene.Net.Tests/Store/TestLockFactory.cs
+++ b/src/Lucene.Net.Tests/Store/TestLockFactory.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Attributes;
 using Lucene.Net.Documents;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Store/TestRAMDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Store/TestRAMDirectory.cs b/src/Lucene.Net.Tests/Store/TestRAMDirectory.cs
index e91d525..50a8617 100644
--- a/src/Lucene.Net.Tests/Store/TestRAMDirectory.cs
+++ b/src/Lucene.Net.Tests/Store/TestRAMDirectory.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Documents;
 using Lucene.Net.Support;
+using Lucene.Net.Support.Threading;
 using NUnit.Framework;
 using System;
 using System.IO;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/00b95661/src/Lucene.Net.Tests/Support/TestCloseableThreadLocal.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Support/TestCloseableThreadLocal.cs b/src/Lucene.Net.Tests/Support/TestCloseableThreadLocal.cs
deleted file mode 100644
index 3d48778..0000000
--- a/src/Lucene.Net.Tests/Support/TestCloseableThreadLocal.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-using Lucene.Net.Analysis;
-using Lucene.Net.Attributes;
-using Lucene.Net.Documents;
-using Lucene.Net.Index;
-using Lucene.Net.Search;
-using Lucene.Net.Store;
-using NUnit.Framework;
-using System;
-using Version = Lucene.Net.Util.LuceneVersion;
-
-#pragma warning disable 612, 618
-namespace Lucene.Net.Support
-{
-    [TestFixture]
-    public class TestCloseableThreadLocal
-    {
-        [Test, LuceneNetSpecific]
-        public void TestMemLeakage()
-        {
-            DisposableThreadLocalProfiler.EnableIDisposableThreadLocalProfiler = true;
-
-            int LoopCount = 100;
-            Analyzer[] analyzers = new Analyzer[LoopCount];
-            RAMDirectory[] dirs = new RAMDirectory[LoopCount];
-            IndexWriter[] indexWriters = new IndexWriter[LoopCount];
-
-            System.Threading.Tasks.Parallel.For(0, LoopCount, (i) =>
-                                                                  {
-                                                                      analyzers[i] = new Lucene.Net.Analysis.Standard.StandardAnalyzer(Version.LUCENE_CURRENT);
-                                                                      dirs[i] = new RAMDirectory();
-                                                                      var conf = new IndexWriterConfig(Version.LUCENE_CURRENT, analyzers[i]);
-                                                                      indexWriters[i] = new IndexWriter(dirs[i], conf /*analyzers[i], true, IndexWriter.MaxFieldLength.UNLIMITED*/);
-                                                                  });
-
-            System.Threading.Tasks.Parallel.For(0, LoopCount, (i) =>
-                                                                  {
-                                                                      Document document = new Document();
-                                                                      document.Add(new Field("field", "some test", Field.Store.NO, Field.Index.ANALYZED));
-                                                                      indexWriters[i].AddDocument(document);
-                                                                  });
-
-            System.Threading.Tasks.Parallel.For(0, LoopCount, (i) =>
-                                                                  {
-                                                                      analyzers[i].Dispose();
-                                                                      indexWriters[i].Dispose();
-                                                                  });
-
-            System.Threading.Tasks.Parallel.For(0, LoopCount, (i) =>
-                                                                  {
-                                                                      using (IndexReader reader = DirectoryReader.Open(dirs[i]))
-                                                                      {
-                                                                          IndexSearcher searcher = new IndexSearcher(reader);
-                                                                          TopDocs d = searcher.Search(new TermQuery(new Term("field", "test")), 10);
-                                                                      }
-                                                                  });
-
-            System.Threading.Tasks.Parallel.For(0, LoopCount, (i) => dirs[i].Dispose());
-
-            GC.Collect(GC.MaxGeneration);
-            GC.WaitForPendingFinalizers();
-
-            int aliveObjects = 0;
-            foreach (WeakReference w in DisposableThreadLocalProfiler.Instances)
-            {
-                object o = w.Target;
-                if (o != null) aliveObjects++;
-            }
-
-            DisposableThreadLocalProfiler.EnableIDisposableThreadLocalProfiler = false;
-
-            Assert.AreEqual(0, aliveObjects);
-        }
-    }
-}
-
-#if NET35
-
-namespace System.Threading.Tasks
-{
-    public static class Parallel
-    {
-        public static void For(int start, int end, Action<int> loopAction)
-        {
-            for(int i = start; i < end; i++)
-            {
-                loopAction(i);
-            }
-        }
-    }
-}
-#pragma warning restore 612, 618
-#endif
\ No newline at end of file


Mime
View raw message