Open mao3511 opened 4 years ago
This is really a problem. For QNX, sem_timedwait_monotonic() solve the problem, but it is a BB OS extension. For Linux, there is no replacement. One workaround is to create worker with FDB_WORKER_ENABLE_FD_LOOP asserted. The flag force event loop to use poll() rather than sem_timedwait(), which can avoid the issue. Long-term solution: QNX - sem_timedwait_monotonic() Linux - futex() or cond var Windows - unchanged.
BaseWorker 默认创建 CThreadEventLoop ;
Linux 平台,其 dispatch函数中会用到信号量操作,其中信号量的超时时间用到了:
clock_gettime(CLOCK_REALTIME) + sem_timedwait
再运行过程中,如果系统时间有变化,会不会导致卡死卡死状态?