25 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)
841Mutex = 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)
841Mutex = new Mutex(
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\ShadowCopyAnalyzerAssemblyLoader.cs (1)
247var mutex = new Mutex(initiallyOwned: false, name: guid);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
EventHookup\EventHookupTestState.cs (1)
41_testSessionHookupMutex = new Mutex(false);
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\MetadataAsSourceFileService.cs (1)
63_mutex = new Mutex(initiallyOwned: true, name: CreateMutexName(guidString));
Microsoft.CodeAnalysis.Workspaces (1)
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerAssemblyLoader.cs (1)
247var mutex = new Mutex(initiallyOwned: false, name: guid);
Microsoft.ML.Core (1)
Utilities\ResourceManagerUtils.cs (1)
254var mutex = new Mutex(false, "Resource" + fileName);
PresentationCore (1)
MS\Internal\IO\Packaging\NetStream.cs (1)
1310private Mutex _tempFileMutex = new Mutex(false);
Replay (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
841Mutex = new Mutex(
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)
66result = new Mutex(myHandle);
vbc (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
841Mutex = new Mutex(
VBCSCompiler (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
841Mutex = new Mutex(
74 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)
834public readonly Mutex Mutex; 852Mutex? m = null; 855return Mutex.TryOpenExisting(mutexName, out m);
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)
834public readonly Mutex Mutex; 852Mutex? m = null; 855return Mutex.TryOpenExisting(mutexName, out m);
Microsoft.CodeAnalysis (6)
DiagnosticAnalyzer\ShadowCopyAnalyzerAssemblyLoader.cs (6)
37private readonly Lazy<(string directory, Mutex)> _shadowCopyDirectoryAndMutex; 65_shadowCopyDirectoryAndMutex = new Lazy<(string directory, Mutex)>( 90Mutex? mutex = null; 95if (!Mutex.TryOpenExisting(name, out mutex)) 242private (string directory, Mutex mutex) CreateUniqueDirectoryForProcess() 247var mutex = new Mutex(initiallyOwned: false, name: guid);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (4)
EventHookup\EventHookupCommandHandler.cs (1)
58internal Mutex TESTSessionHookupMutex;
EventHookup\EventHookupSessionManager.cs (1)
130Mutex testSessionHookupMutex)
EventHookup\EventHookupSessionManager_EventHookupSession.cs (2)
45internal Mutex? TESTSessionHookupMutex = null; 91Mutex testSessionHookupMutex)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
EventHookup\EventHookupTestState.cs (1)
29private readonly Mutex _testSessionHookupMutex;
Microsoft.CodeAnalysis.Features (3)
MetadataAsSource\MetadataAsSourceFileService.cs (3)
50private readonly Mutex _mutex; 129if (Mutex.TryOpenExisting(CreateMutexName(directoryInfo.Name), out var acquiredMutex))
Microsoft.CodeAnalysis.Workspaces (6)
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerAssemblyLoader.cs (6)
37private readonly Lazy<(string directory, Mutex)> _shadowCopyDirectoryAndMutex; 65_shadowCopyDirectoryAndMutex = new Lazy<(string directory, Mutex)>( 90Mutex? mutex = null; 95if (!Mutex.TryOpenExisting(name, out mutex)) 242private (string directory, Mutex mutex) CreateUniqueDirectoryForProcess() 247var mutex = new Mutex(initiallyOwned: false, name: guid);
Microsoft.ML.Core (1)
Utilities\ResourceManagerUtils.cs (1)
254var mutex = new Mutex(false, "Resource" + fileName);
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)
71internal ByteRangeDownloader(Uri requestedUri, Stream tempStream, SafeWaitHandle eventHandle, Mutex fileMutex) 342internal Mutex FileMutex 856private Mutex _fileMutex; // object controlling synchronization on the temp file - if this is null, we own the stream
MS\Internal\IO\Packaging\NetStream.cs (1)
1310private Mutex _tempFileMutex = new Mutex(false);
Replay (3)
src\Compilers\Shared\BuildServerConnection.cs (3)
834public readonly Mutex Mutex; 852Mutex? m = null; 855return Mutex.TryOpenExisting(mutexName, out m);
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 (7)
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 (3)
41public static Mutex OpenExisting(string name) 43switch (OpenExistingWorker(name, out Mutex? result)) 58public static bool TryOpenExisting(string name, [NotNullWhen(true)] out Mutex? result) =>
src\System\Threading\Mutex.CoreCLR.Unix.cs (1)
36private static OpenExistingResult OpenExistingWorker(string name, out 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)
834public readonly Mutex Mutex; 852Mutex? m = null; 855return Mutex.TryOpenExisting(mutexName, out m);
VBCSCompiler (3)
src\Compilers\Shared\BuildServerConnection.cs (3)
834public readonly Mutex Mutex; 852Mutex? m = null; 855return Mutex.TryOpenExisting(mutexName, out m);
VBCSCompiler.UnitTests (1)
BuildClientTests.cs (1)
105using (var outer = new Mutex(initiallyOwned: true, name: BuildServerConnection.GetClientMutexName(_pipeName), out bool createdNew))