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

WaitForAllSynced() private method

Blocks until all files in syncing are sync'd
private WaitForAllSynced ( ICollection syncing ) : bool
syncing ICollection
return bool
		private bool WaitForAllSynced(ICollection<System.String> syncing)
		{
			lock (synced)
			{
				IEnumerator<string> it = syncing.GetEnumerator();
				while (it.MoveNext())
				{
					System.String fileName = it.Current;
					while (!synced.Contains(fileName))
					{
						if (!syncing.Contains(fileName))
						// There was an error because a file that was
						// previously syncing failed to appear in synced
							return false;
						else
							System.Threading.Monitor.Wait(synced);
							
					}
				}
				return true;
			}
		}
		
IndexWriter