34 instantiations of Mutex
Aspire.Dashboard.Tests (1)
tests\Shared\TestCertificateLoader.cs (1)
14? new Mutex(initiallyOwned: false, "Global\\AspireTests.Certificates.LoadPfxCertificate")
csc (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
944Mutex = new Mutex(
dotnet (1)
BuildServerConnection.cs (1)
944Mutex = new Mutex(
HttpClientApp (1)
src\Shared\TestResources.cs (1)
17new Mutex(initiallyOwned: false, "Global\\KestrelTests.Certificates.LoadPfxCertificate") :
InMemory.FunctionalTests (1)
src\Shared\TestResources.cs (1)
17new Mutex(initiallyOwned: false, "Global\\KestrelTests.Certificates.LoadPfxCertificate") :
Interop.FunctionalTests (1)
src\Shared\TestResources.cs (1)
17new Mutex(initiallyOwned: false, "Global\\KestrelTests.Certificates.LoadPfxCertificate") :
Microsoft.Arcade.Common (1)
Helpers.cs (1)
36using var mutex = new Mutex(false, mutexName);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\TestResources.cs (1)
17new Mutex(initiallyOwned: false, "Global\\KestrelTests.Certificates.LoadPfxCertificate") :
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Shared\TestResources.cs (1)
17new Mutex(initiallyOwned: false, "Global\\KestrelTests.Certificates.LoadPfxCertificate") :
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
src\Shared\TestResources.cs (1)
17new Mutex(initiallyOwned: false, "Global\\KestrelTests.Certificates.LoadPfxCertificate") :
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
src\Shared\TestResources.cs (1)
17new Mutex(initiallyOwned: false, "Global\\KestrelTests.Certificates.LoadPfxCertificate") :
Microsoft.Build (1)
BackEnd\Node\ServerNamedMutex.cs (1)
19_serverMutex = new Mutex(
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
944Mutex = new Mutex(
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
944Mutex = new Mutex(
Microsoft.Build.Tasks.Core (1)
UnregisterAssembly.cs (1)
292private static readonly Mutex s_unregisteringLock = new Mutex(false, unregisteringLockName);
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
93Mutex = new Mutex(initiallyOwned: false, name: shadowDirectoryName);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
EventHookup\EventHookupTestState.cs (1)
41_testSessionHookupMutex = new Mutex(false);
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\MetadataAsSourceFileService.cs (1)
65_mutex = new Mutex(initiallyOwned: true, name: CreateMutexName(guidString));
Microsoft.CodeAnalysis.Workspaces (1)
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
93Mutex = new Mutex(initiallyOwned: false, name: shadowDirectoryName);
Microsoft.DotNet.Cli.Utils (1)
ProcessReaper.cs (1)
38_shutdownMutex = new Mutex();
Microsoft.ML.Core (1)
Utilities\ResourceManagerUtils.cs (1)
254var mutex = new Mutex(false, "Resource" + fileName);
Microsoft.NET.Sdk.Razor.Tasks (1)
ServerConnection.cs (1)
148clientMutex = new Mutex(initiallyOwned: true, name: clientMutexName, createdNew: out holdsMutex);
Microsoft.NET.Sdk.Razor.Tool.Tests (1)
ServerLifecycleTest.cs (1)
31using (var mutex = new Mutex(initiallyOwned: true, name: mutexName, createdNew: out var holdsMutex))
PresentationCore (1)
MS\Internal\IO\Packaging\NetStream.cs (1)
1289private Mutex _tempFileMutex = new Mutex(false);
Replay (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
944Mutex = new Mutex(
rzc (3)
ServerCommand.cs (1)
60serverMutex = new Mutex(initiallyOwned: true, name: serverMutexName, createdNew: out holdsMutex);
ServerProtocol\ServerConnection.cs (1)
148clientMutex = new Mutex(initiallyOwned: true, name: clientMutexName, createdNew: out holdsMutex);
ShadowCopyManager.cs (1)
29_mutex = new Mutex(initiallyOwned: false, name: guid);
Sockets.BindTests (1)
src\Shared\TestResources.cs (1)
17new Mutex(initiallyOwned: false, "Global\\KestrelTests.Certificates.LoadPfxCertificate") :
Sockets.FunctionalTests (1)
src\Shared\TestResources.cs (1)
17new Mutex(initiallyOwned: false, "Global\\KestrelTests.Certificates.LoadPfxCertificate") :
System.IO.IsolatedStorage (1)
System\IO\IsolatedStorage\Helper.NonMobile.cs (1)
65return new Mutex(initiallyOwned: false, name: @"Global\" + IdentityHelper.GetStrongHashSuitableForObjectName(pathName));
System.Private.CoreLib (1)
src\System\Threading\Mutex.CoreCLR.Unix.cs (1)
107result = new Mutex(myHandle);
vbc (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
944Mutex = new Mutex(
VBCSCompiler (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
944Mutex = new Mutex(
95 references to Mutex
Aspire.Dashboard.Tests (1)
tests\Shared\TestCertificateLoader.cs (1)
13private static readonly Mutex? s_importPfxMutex = OperatingSystem.IsWindows()
csc (3)
src\Compilers\Shared\BuildServerConnection.cs (3)
937public readonly Mutex Mutex; 955Mutex? m = null; 958return Mutex.TryOpenExisting(mutexName, out m);
dotnet (4)
BuildServerConnection.cs (3)
937public readonly Mutex Mutex; 955Mutex? m = null; 958return Mutex.TryOpenExisting(mutexName, out m);
Installer\Windows\WindowsUtils.cs (1)
54return !Mutex.TryOpenExisting(@"Global\_MSIExecute", out _);
HttpClientApp (1)
src\Shared\TestResources.cs (1)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ?
InMemory.FunctionalTests (1)
src\Shared\TestResources.cs (1)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ?
Interop.FunctionalTests (1)
src\Shared\TestResources.cs (1)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ?
Microsoft.Arcade.Common (1)
Helpers.cs (1)
36using var mutex = new Mutex(false, mutexName);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\TestResources.cs (1)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ?
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Shared\TestResources.cs (1)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ?
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
src\Shared\TestResources.cs (1)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ?
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
src\Shared\TestResources.cs (1)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ?
Microsoft.Build (5)
AwaitExtensions.cs (2)
76/// <param name="handle">The handle whose signal triggers the task to be completed. Do not use a <see cref="Mutex"/> here.</param> 90/// <param name="handles">The handles whose signals triggers the task to be completed. Do not use a <see cref="Mutex"/> here.</param>
BackEnd\Node\ServerNamedMutex.cs (3)
11private readonly Mutex _serverMutex; 37bool result = Mutex.TryOpenExisting(mutexName, out Mutex? mutex);
Microsoft.Build.Tasks.CodeAnalysis (3)
src\Compilers\Shared\BuildServerConnection.cs (3)
937public readonly Mutex Mutex; 955Mutex? m = null; 958return Mutex.TryOpenExisting(mutexName, out m);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (3)
src\Compilers\Shared\BuildServerConnection.cs (3)
937public readonly Mutex Mutex; 955Mutex? m = null; 958return Mutex.TryOpenExisting(mutexName, out m);
Microsoft.Build.Tasks.Core (1)
UnregisterAssembly.cs (1)
292private static readonly Mutex s_unregisteringLock = new Mutex(false, unregisteringLockName);
Microsoft.CodeAnalysis (3)
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (3)
40private Mutex Mutex { get; } 125Mutex? mutex = null; 130if (!Mutex.TryOpenExisting(name, out mutex))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (4)
EventHookup\EventHookupCommandHandler.cs (1)
58internal Mutex TESTSessionHookupMutex;
EventHookup\EventHookupSessionManager.cs (1)
128Mutex testSessionHookupMutex)
EventHookup\EventHookupSessionManager_EventHookupSession.cs (2)
42internal Mutex? TESTSessionHookupMutex = null; 88Mutex testSessionHookupMutex)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
EventHookup\EventHookupTestState.cs (1)
29private readonly Mutex _testSessionHookupMutex;
Microsoft.CodeAnalysis.Features (3)
MetadataAsSource\MetadataAsSourceFileService.cs (3)
51private readonly Mutex _mutex; 131if (Mutex.TryOpenExisting(CreateMutexName(directoryInfo.Name), out var acquiredMutex))
Microsoft.CodeAnalysis.Workspaces (3)
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (3)
40private Mutex Mutex { get; } 125Mutex? mutex = null; 130if (!Mutex.TryOpenExisting(name, out mutex))
Microsoft.DotNet.Cli.Utils (2)
ProcessReaper.cs (1)
191private Mutex? _shutdownMutex;
Windows.cs (1)
34!Mutex.TryOpenExisting(@"Global\_MSIExecute", out _);
Microsoft.ML.Core (1)
Utilities\ResourceManagerUtils.cs (1)
254var mutex = new Mutex(false, "Resource" + fileName);
Microsoft.NET.Sdk.Razor.Tasks (3)
ServerConnection.cs (3)
26Mutex mutex = null; 30open = Mutex.TryOpenExisting(mutexName, out mutex); 141Mutex clientMutex = null;
Microsoft.NET.Sdk.Razor.Tool.Tests (3)
ServerLifecycleTest.cs (3)
31using (var mutex = new Mutex(initiallyOwned: true, name: mutexName, createdNew: out var holdsMutex)) 66Mutex mutex = null; 69Assert.True(Mutex.TryOpenExisting(mutexName, out mutex));
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
1141[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Mutex))]
netstandard (1)
netstandard.cs (1)
2091[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Mutex))]
PresentationCore (4)
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (3)
70internal ByteRangeDownloader(Uri requestedUri, Stream tempStream, SafeWaitHandle eventHandle, Mutex fileMutex) 341internal Mutex FileMutex 852private Mutex _fileMutex; // object controlling synchronization on the temp file - if this is null, we own the stream
MS\Internal\IO\Packaging\NetStream.cs (1)
1289private Mutex _tempFileMutex = new Mutex(false);
Replay (3)
src\Compilers\Shared\BuildServerConnection.cs (3)
937public readonly Mutex Mutex; 955Mutex? m = null; 958return Mutex.TryOpenExisting(mutexName, out m);
rzc (9)
ServerCommand.cs (1)
55Mutex serverMutex = null;
ServerProtocol\ServerConnection.cs (3)
26Mutex mutex = null; 30open = Mutex.TryOpenExisting(mutexName, out mutex); 141Mutex clientMutex = null;
ShadowCopyManager.cs (3)
18private readonly Mutex _mutex; 139Mutex mutex = null; 146if (!Mutex.TryOpenExisting(Path.GetFileName(directory).ToLowerInvariant(), out mutex))
ShutdownCommand.cs (2)
84if (Mutex.TryOpenExisting(MutexName.GetServerMutexName(Pipe.Value()), out var mutex))
Sockets.BindTests (1)
src\Shared\TestResources.cs (1)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ?
Sockets.FunctionalTests (1)
src\Shared\TestResources.cs (1)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ?
System.IO.IsolatedStorage (2)
System\IO\IsolatedStorage\Helper.NonMobile.cs (2)
36using (Mutex m = CreateMutexNotOwned(rootDirectory)) 63private static Mutex CreateMutexNotOwned(string pathName)
System.Private.CoreLib (10)
src\libraries\System.Private.CoreLib\src\System\Threading\AbandonedMutexException.cs (3)
15private Mutex? _mutex; 66_mutex = handle as Mutex; 69public Mutex? Mutex => _mutex;
src\libraries\System.Private.CoreLib\src\System\Threading\Mutex.cs (6)
108public static Mutex OpenExisting(string name, NamedWaitHandleOptions options) 110OpenExistingResult openExistingResult = OpenExistingWorker(name, new(options), out Mutex? result); 120public static Mutex OpenExisting(string name) 122OpenExistingResult openExistingResult = OpenExistingWorker(name, options: default, out Mutex? result); 164public static bool TryOpenExisting(string name, NamedWaitHandleOptions options, [NotNullWhen(true)] out Mutex? result) => 167public static bool TryOpenExisting(string name, [NotNullWhen(true)] out Mutex? result) =>
src\System\Threading\Mutex.CoreCLR.Unix.cs (1)
70out Mutex? result)
System.Threading (1)
artifacts\obj\System.Threading\Debug\net10.0\System.Threading.Forwards.cs (1)
19[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Mutex))]
System.Threading.AccessControl (5)
artifacts\obj\System.Threading.AccessControl\Debug\net10.0\System.Threading.AccessControl.Extensions.notsupported.cs (5)
17public static System.Threading.Mutex Create(bool initiallyOwned, string? name, out bool createdNew, System.Security.AccessControl.MutexSecurity? mutexSecurity) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 18public static System.Threading.Mutex OpenExisting(string name, System.Security.AccessControl.MutexRights rights) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 19public static bool TryOpenExisting(string name, System.Security.AccessControl.MutexRights rights, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Threading.Mutex? result) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 30public static System.Security.AccessControl.MutexSecurity GetAccessControl(this System.Threading.Mutex mutex) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 33public static void SetAccessControl(this System.Threading.Mutex mutex, System.Security.AccessControl.MutexSecurity mutexSecurity) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); }
vbc (3)
src\Compilers\Shared\BuildServerConnection.cs (3)
937public readonly Mutex Mutex; 955Mutex? m = null; 958return Mutex.TryOpenExisting(mutexName, out m);
VBCSCompiler (3)
src\Compilers\Shared\BuildServerConnection.cs (3)
937public readonly Mutex Mutex; 955Mutex? m = null; 958return Mutex.TryOpenExisting(mutexName, out m);