그는 자신이 걸어 놓은 lock을 통과할 수 있을까?

    [c++] mutex, 그는 자신이 걸어 놓은 lock을 통과할 수 있을까?

    1.mutex로 걸어놓은 자신의 lock을 자신이 다시 lock에 접근했을 때 통과할 수 있을까? 2.기본 바탕 코드 #include #include int main() { pthread_mutex_t m_mutex; pthread_mutex_init(&m_mutex, NULL); printf("Here is start point lock area\n"); pthread_mutex_lock(&m_mutex); printf("Here is lock area\n"); pthread_mutex_unlock(&m_mutex); printf("Here is out of lock area\n"); pthread_mutex_destroy(&m_mutex); return 0; } 출력이 순서대로 된다. 3.lock을 ..