System.Web.SessionState.SessionStateModule.WaitForStoreUnlock C# (CSharp) Method

WaitForStoreUnlock() private method

private WaitForStoreUnlock ( HttpContext context, string sessionId, bool isReadonly ) : void
context System.Web.HttpContext
sessionId string
isReadonly bool
return void
		void WaitForStoreUnlock (HttpContext context, string sessionId, bool isReadonly) {
			AutoResetEvent are = new AutoResetEvent (false);
			TimerCallback tc = new TimerCallback (StoreUnlockWaitCallback);
			CallbackState cs = new CallbackState (context, are, sessionId, isReadonly);
			using (Timer timer = new Timer (tc, cs, 500, 500)) {
				try {
					are.WaitOne (executionTimeout, false);
				}
				catch {
					storeData = null;
				}
			}
		}