CHECK ABORT every message dispatch

This commit is contained in:
Cloud Wu
2014-10-11 13:10:39 +08:00
parent 4a8bf4f39a
commit 1c62785d71

View File

@@ -125,9 +125,9 @@ _worker(void *p) {
skynet_initthread(THREAD_WORKER);
struct message_queue * q = NULL;
for (;;) {
CHECK_ABORT
q = skynet_context_message_dispatch(sm, q, weight);
if (q == NULL) {
CHECK_ABORT
if (pthread_mutex_lock(&m->mutex) == 0) {
++ m->sleep;
// "spurious wakeup" is harmless,