wait and notify in C/C++ shared memory

前端 未结 6 816
旧巷少年郎
旧巷少年郎 2020-12-13 04:21

How to wait and notify like in Java In C/C++ for shared memory between two or more thread?I use pthread library.

6条回答
  •  渐次进展
    2020-12-13 04:50

    pthread_cond_wait and pthread_cond_signal can be used to synchronize based on a condition

提交回复
热议问题