bugfix: check globalmq push is complete

This commit is contained in:
Cloud Wu
2014-05-26 13:18:09 +08:00
parent 90cd967333
commit f3b1f5be51

View File

@@ -88,6 +88,10 @@ skynet_globalmq_pop() {
}
struct message_queue * mq = q->queue[head_ptr];
if (mq == NULL) {
// globalmq push not complete
return NULL;
}
if (!__sync_bool_compare_and_swap(&q->head, head, head+1)) {
return NULL;
}