We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 745e80a commit 63c994aCopy full SHA for 63c994a
lib_fiber/c/src/fbase_event.c
@@ -83,6 +83,11 @@ int fbase_event_wait(FIBER_BASE *fbase)
83
}
84
85
while (1) {
86
+ if (acl_fiber_scheduled() && read_wait(fbase->event_in, -1) == -1) {
87
+ msg_error("%s(%d), %s: read_wait error, fd=%d",
88
+ __FILE__, __LINE__, __FUNCTION__, fbase->event_in);
89
+ return -1;
90
+ }
91
#ifdef SYS_WIN
92
ret = (int) acl_fiber_recv(fbase->event_in, (char*) &n, sizeof(n), 0);
93
#else
@@ -107,8 +112,9 @@ int fbase_event_wait(FIBER_BASE *fbase)
107
112
interrupt, (int) fbase->event_in, ret);
108
113
doze(1);
109
114
} else if (err == FIBER_EAGAIN) {
110
- msg_info("%s(%d), %s: read EAGAIN, in=%d, ret=%d",
111
- __FILE__, __LINE__, __FUNCTION__,
115
+ msg_info("%s(%d), %s: scheduled %s, read EAGAIN, "
116
+ "in=%d, ret=%d", __FILE__, __LINE__,
117
+ __FUNCTION__, acl_fiber_scheduled() ? "yes":"no",
118
(int) fbase->event_in, ret);
119
120
} else {
0 commit comments