… | |
… | |
1160 | ev_loop (EV_P_ int flags) |
1160 | ev_loop (EV_P_ int flags) |
1161 | { |
1161 | { |
1162 | double block; |
1162 | double block; |
1163 | loop_done = flags & (EVLOOP_ONESHOT | EVLOOP_NONBLOCK) ? 1 : 0; |
1163 | loop_done = flags & (EVLOOP_ONESHOT | EVLOOP_NONBLOCK) ? 1 : 0; |
1164 | |
1164 | |
1165 | do |
1165 | while (activecnt) |
1166 | { |
1166 | { |
1167 | /* queue check watchers (and execute them) */ |
1167 | /* queue check watchers (and execute them) */ |
1168 | if (expect_false (preparecnt)) |
1168 | if (expect_false (preparecnt)) |
1169 | { |
1169 | { |
1170 | queue_events (EV_A_ (W *)prepares, preparecnt, EV_PREPARE); |
1170 | queue_events (EV_A_ (W *)prepares, preparecnt, EV_PREPARE); |
… | |
… | |
1233 | /* queue check watchers, to be executed first */ |
1233 | /* queue check watchers, to be executed first */ |
1234 | if (checkcnt) |
1234 | if (checkcnt) |
1235 | queue_events (EV_A_ (W *)checks, checkcnt, EV_CHECK); |
1235 | queue_events (EV_A_ (W *)checks, checkcnt, EV_CHECK); |
1236 | |
1236 | |
1237 | call_pending (EV_A); |
1237 | call_pending (EV_A); |
|
|
1238 | |
|
|
1239 | if (loop_done) |
|
|
1240 | break; |
1238 | } |
1241 | } |
1239 | while (activecnt && !loop_done); |
|
|
1240 | |
1242 | |
1241 | if (loop_done != 2) |
1243 | if (loop_done != 2) |
1242 | loop_done = 0; |
1244 | loop_done = 0; |
1243 | } |
1245 | } |
1244 | |
1246 | |