mirror of
https://github.com/lxsang/ant-http
synced 2024-11-17 17:08:20 +01:00
fix deadlock
This commit is contained in:
parent
ee5c630052
commit
64e912ab6e
@ -34,6 +34,8 @@ static void stop(antd_scheduler_t* scheduler)
|
||||
pthread_mutex_destroy(&scheduler->scheduler_lock);
|
||||
pthread_mutex_destroy(&scheduler->worker_lock);
|
||||
pthread_mutex_destroy(&scheduler->pending_lock);
|
||||
sem_unlink("scheduler");
|
||||
sem_unlink("worker");
|
||||
sem_close(scheduler->scheduler_sem);
|
||||
sem_close(scheduler->worker_sem);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "utils.h"
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#define N_PRIORITY 10
|
||||
#define NORMAL_PRIORITY ((int)((N_PRIORITY - 1) / 2))
|
||||
#define LOW_PRIORITY (N_PRIORITY - 1)
|
||||
|
Loading…
Reference in New Issue
Block a user