Switch from events to locks during parsing (#87)

* Switch from event to locks in binding.

* Remove unneeded null check.
This commit is contained in:
Karl Burtram
2016-10-12 15:09:24 -07:00
committed by GitHub
parent 9f39ac6014
commit c5f44ccee1
9 changed files with 87 additions and 85 deletions

View File

@@ -4,7 +4,6 @@
//
using System.Collections.Generic;
using System.Threading;
using Microsoft.SqlServer.Management.SqlParser.Intellisense;
using Microsoft.SqlServer.Management.SqlParser.Parser;
@@ -15,14 +14,14 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
/// </summary>
internal class ScriptParseInfo
{
private ManualResetEvent buildingMetadataEvent = new ManualResetEvent(initialState: true);
private object buildingMetadataLock = new object();
/// <summary>
/// Event which tells if MetadataProvider is built fully or not
/// </summary>
public ManualResetEvent BuildingMetadataEvent
public object BuildingMetadataLock
{
get { return this.buildingMetadataEvent; }
get { return this.buildingMetadataLock; }
}
/// <summary>