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 02351e1ab48f9faf1d0153ce9d4c21617cf6c174
parent 10aa4a28fe91806907427c79ec9ad4b934014a9f
Author: Joris Vink <joris@coders.se>
Date:   Mon,  9 Dec 2013 11:40:59 +0100

Update last_cb_run after we call the cb.

Makes sure we don't fall into cascading calls to the cb
if it takes longer to complete then the interval set.

Diffstat:
src/worker.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/worker.c b/src/worker.c @@ -263,8 +263,8 @@ kore_worker_entry(struct kore_worker *kw) if (kore_cb != NULL && kore_cb_worker != -1 && kore_cb_worker == worker->id) { if ((now - last_cb_run) >= kore_cb_interval) { - last_cb_run = now; kore_cb(); + last_cb_run = now; } }