我看过一个例子使用pthread_timedjoin_np可以,不过我在linux的pthread库里找不到这条函数 timespec joinDelay; joinDelay.tv_nsec = milliseconds; pthread_timedjoin_np(thread, NULL, &joinDelay);