From b2bac7ae91253b0bd27e9b03ec5fc30ac1522928 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 1 Dec 2021 21:52:55 +0000 Subject: Faster shutdown and cleanups by freeing route attributes strictly from main loop --- sysdep/unix/coroutine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysdep') diff --git a/sysdep/unix/coroutine.c b/sysdep/unix/coroutine.c index e4657157..4747d01a 100644 --- a/sysdep/unix/coroutine.c +++ b/sysdep/unix/coroutine.c @@ -201,5 +201,6 @@ struct coroutine *coro_run(pool *p, void (*entry)(void *), void *data) void coro_yield(void) { - usleep(100); + const struct timespec req = { .tv_nsec = 100 }; + nanosleep(&req, NULL); } -- cgit v1.2.3