kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit dbb99a56d1fc522473517af0da4e16dc5b9ac0d0
parent 58a6b4e3318697f060108b9712f1d917fa2047d7
Author: Joris Vink <joris@coders.se>
Date:   Mon, 16 Sep 2019 19:34:47 +0200

move new/wokenup/suspended coros to end of lists.

Diffstat:
src/python.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/python.c b/src/python.c @@ -551,7 +551,7 @@ python_coro_create(PyObject *obj, struct http_request *req) coro->id = coro_id++; coro->state = CORO_STATE_RUNNABLE; - TAILQ_INSERT_HEAD(&coro_runnable, coro, list); + TAILQ_INSERT_TAIL(&coro_runnable, coro, list); if (coro->request != NULL) http_request_sleep(coro->request); @@ -613,7 +613,7 @@ python_coro_wakeup(struct python_coro *coro) coro->state = CORO_STATE_RUNNABLE; TAILQ_REMOVE(&coro_suspended, coro, list); - TAILQ_INSERT_HEAD(&coro_runnable, coro, list); + TAILQ_INSERT_TAIL(&coro_runnable, coro, list); } static void @@ -624,7 +624,7 @@ python_coro_suspend(struct python_coro *coro) coro->state = CORO_STATE_SUSPENDED; TAILQ_REMOVE(&coro_runnable, coro, list); - TAILQ_INSERT_HEAD(&coro_suspended, coro, list); + TAILQ_INSERT_TAIL(&coro_suspended, coro, list); } static void