mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-17 14:58:34 +00:00
FS-9820 #resolve [Add thread_pool to libks]
This commit is contained in:
1 parent
b86f7a6d30
commit
b6df83dd10
8 files changed
+339
-4
No files matched your search
@@ -393,10 +393,14 @@ KS_DECLARE(ks_status_t) ks_cond_timedwait(ks_cond_t *cond, ks_time_t ms)
|
||||
#else
|
||||
struct timespec ts;
|
||||
ks_time_t n = ks_time_now() + (ms * 1000);
|
||||
int r = 0;
|
||||
|
||||
ts.tv_sec = ks_time_sec(n);
|
||||
ts.tv_nsec = ks_time_nsec(n);
|
||||
if (pthread_cond_timedwait(&cond->cond, &cond->mutex->mutex, &ts)) {
|
||||
switch(errno) {
|
||||
r = pthread_cond_timedwait(&cond->cond, &cond->mutex->mutex, &ts);
|
||||
|
||||
if (r) {
|
||||
switch(r) {
|
||||
case ETIMEDOUT:
|
||||
return KS_STATUS_TIMEOUT;
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user