전체 글

Andras Town

    쓰레드 동기화 기법 Interlocked

    #include #include #include unsigned long test_int = 0; void ThreadLoop(int number){for(int i = 0; i < number; ++i){ // 변수의 증가를 안전하게 보장한다.InterlockedIncrement(&test_int);std::cout

    Critical_Section 예제

    #include #include #include int test_int = 0; // 크리티컬 섹션 변수CRITICAL_SECTION critical_section_; void ThreadLoop(int number){static int thread_number; for(int i = 0; i < number; ++i){std::cout

    멀티 쓰레드의 문제

    멀티 쓰레드의 문제

    #include #include #include int test_int = 0; void ThreadLoop(int number){static int thread_number; std::cout