From 3ce13bea0c33a530c8d27a23536a5c2f7a37a776 Mon Sep 17 00:00:00 2001 From: Xpol Wan Date: Fri, 29 Apr 2016 10:55:20 +0800 Subject: [PATCH] unlock event queue when handling event. --- src/pc_pomelo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pc_pomelo.c b/src/pc_pomelo.c index 51f1fc9..cbb1a6a 100644 --- a/src/pc_pomelo.c +++ b/src/pc_pomelo.c @@ -368,10 +368,12 @@ int pc_client_poll(pc_client_t* client) QUEUE_REMOVE(&ev->queue); QUEUE_INIT(&ev->queue); + pc_mutex_unlock(&client->event_mutex); assert((PC_IS_PRE_ALLOC(ev->type) && PC_PRE_ALLOC_IS_BUSY(ev->type)) || PC_IS_DYN_ALLOC(ev->type)); pc__handle_event(client, ev); + pc_mutex_lock(&client->event_mutex); } client->is_in_poll = 0; }