Lucene.Net.Index.IndexWriter.ShouldClose C# (CSharp) Method

ShouldClose() private method

private ShouldClose ( ) : bool
return bool
		private bool ShouldClose()
		{
			lock (this)
			{
				while (true)
				{
					if (!closed)
					{
						if (!closing)
						{
							closing = true;
							return true;
						}
						else
						{
							// Another thread is presently trying to close;
							// wait until it finishes one way (closes
							// successfully) or another (fails to close)
							DoWait();
						}
					}
					else
						return false;
				}
			}
		}
		
IndexWriter