… | |
… | |
37 | |
37 | |
38 | ++incede; |
38 | ++incede; |
39 | |
39 | |
40 | CORO_CEDE_NOTSELF; |
40 | CORO_CEDE_NOTSELF; |
41 | |
41 | |
42 | while (CORO_NREADY > incede && CORO_CEDE) |
42 | while (CORO_NREADY >= incede && CORO_CEDE) |
43 | ; |
43 | ; |
44 | |
44 | |
45 | /* if still ready, then we have lower-priority coroutines. |
45 | /* if still ready, then we have lower-priority coroutines. |
46 | * poll anyways, but do not block. |
46 | * poll anyways, but do not block. |
47 | */ |
47 | */ |
48 | if (CORO_NREADY > incede && !ev_is_active (&idler)) |
48 | if (CORO_NREADY >= incede && !ev_is_active (&idler)) |
49 | ev_idle_start (&idler); |
49 | ev_idle_start (&idler); |
50 | |
50 | |
51 | --incede; |
51 | --incede; |
52 | } |
52 | } |
53 | |
53 | |