mirror of
https://github.com/lxsang/ant-http
synced 2024-12-25 16:28:21 +01:00
fix deadlock
This commit is contained in:
parent
ba4bfadec0
commit
54bb040ef4
@ -153,13 +153,13 @@ void antd_scheduler_init(antd_scheduler_t* scheduler, int n)
|
||||
scheduler->workers_queue = NULL;
|
||||
scheduler->pending_task = 0 ;
|
||||
// init semaphore
|
||||
scheduler->scheduler_sem = shm_open("scheduler", O_RDWR | O_CREAT, S_IRWXU);
|
||||
scheduler->scheduler_sem = sem_open("scheduler", O_RDWR | O_CREAT, S_IRWXU);
|
||||
if (!scheduler->scheduler_sem)
|
||||
{
|
||||
LOG("Cannot open semaphore for scheduler\n");
|
||||
exit(-1);
|
||||
}
|
||||
scheduler->worker_sem = shm_open("worker", O_RDWR | O_CREAT, S_IRWXU);
|
||||
scheduler->worker_sem = sem_open("worker", O_RDWR | O_CREAT, S_IRWXU);
|
||||
if (!scheduler->worker_sem)
|
||||
{
|
||||
LOG("Cannot open semaphore for workers\n");
|
||||
|
Loading…
Reference in New Issue
Block a user