CLOCK_MONOTONIC and pthread_mutex_timedlock / pthread_cond_timedwait

前端 未结 2 1765
忘了有多久
忘了有多久 2021-02-01 20:04

The pthread_mutex_timedlock documentation says that abs_timeout takes a CLOCK_REALTIME. However, we all know that it is inappropriate for timing a spec

2条回答
  •  误落风尘
    2021-02-01 20:31

    On OS X and FreeBSD, you can use kqueue and kevent. See my answer here: https://stackoverflow.com/a/31174803/432

提交回复
热议问题