[C#][네트워크] Interlocked


[C#][네트워크] Interlocked

Interlocked Interlocked이 무엇인가에 대해 설명하기 앞서 다음 코드의 실행 결과로 어떤 값이 출력될까? using System; using System.Numerics; namespace CSharp { class Program { static int number = 0; static void Thread_1() { for (int i = 0; i < 100000; i++) number++; } static void Thread_2() { for (int i = 0; i < 100000; i++) number--; } static void Main() { Task t1 = new Task(Thread_1); Task t2 = new Task(Thread_2); t1.Start(); t2..


원문링크 : [C#][네트워크] Interlocked