File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
samples/snippets/csharp/VS_Snippets_CLR_System/system.Threading.Mutex 1Arg Ctor Example/CS Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 44
55class Test
66{
7- // Create a new Mutex. The creating thread owns the Mutex.
8- private static Mutex mut = new Mutex ( true ) ;
7+ private static Mutex mut ;
98 private const int numIterations = 1 ;
109 private const int numThreads = 3 ;
1110
1211 static void Main ( )
1312 {
13+ // Create a new Mutex. The creating thread owns the Mutex.
14+ mut = new Mutex ( true ) ;
1415 // Create the threads that will use the protected resource.
1516 for ( int i = 0 ; i < numThreads ; i ++ )
1617 {
Original file line number Diff line number Diff line change 1+ <Project Sdk =" Microsoft.NET.Sdk" >
2+
3+ <PropertyGroup >
4+ <OutputType >Exe</OutputType >
5+ <TargetFramework >net6.0</TargetFramework >
6+ </PropertyGroup >
7+
8+ </Project >
You can’t perform that action at this time.
0 commit comments