internal static void GetLock(ref bool gotLock)
 {
     try
     {
     }
     finally
     {
         Monitor.Enter(BuildManager.TheBuildManager);
         _mutex.WaitOne();
         gotLock = true;
     }
 }
Example #2
0
        internal static void GetLock(ref bool gotLock)
        {
            // The idea of this try/finally is to make sure that the statements are always
            // executed together (VSWhidbey 319154)
            // This code should be using a constrained execution region.
            try {
            }
            finally {
                // Always take the BuildManager lock *before* taking the mutex, to avoid possible
                // deadlock situations (VSWhidbey 530732)
#pragma warning disable 0618
                //@TODO: This overload of Monitor.Enter is obsolete.  Please change this to use Monitor.Enter(ref bool), and remove the pragmas   -- Microsoft
                Monitor.Enter(BuildManager.TheBuildManager);
#pragma warning restore 0618
                _mutex.WaitOne();
                gotLock = true;
            }
        }
 internal static void GetLock()
 {
     _mutex.WaitOne();
 }
Example #4
0
 private static void GetLock()
 {
     Debug.Trace("PreservedAssemblyEntry", "Waiting for lock: " + HttpRuntime.AppDomainAppIdInternal);
     _mutex.WaitOne();
     Debug.Trace("PreservedAssemblyEntry", "Got lock: " + HttpRuntime.AppDomainAppIdInternal);
 }