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.Threading;
using System.Threading.Tasks;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.SmoMetadataProvider;
using Microsoft.SqlServer.Management.SqlParser.Binder;
@@ -25,7 +24,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServices
{
public TestBindingContext()
{
this.BindingLocked = new ManualResetEvent(initialState: true);
this.BindingLock = new object();
this.BindingTimeout = 3000;
}
@@ -39,7 +38,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServices
public IBinder Binder { get; set; }
public ManualResetEvent BindingLocked { get; set; }
public object BindingLock { get; set; }
public int BindingTimeout { get; set; }