diff options
author | Maria Matejka <mq@jmq.cz> | 2021-12-01 21:52:55 +0000 |
---|---|---|
committer | Maria Matejka <mq@jmq.cz> | 2021-12-01 21:52:55 +0000 |
commit | b2bac7ae91253b0bd27e9b03ec5fc30ac1522928 (patch) | |
tree | 8d8d18cbeaa5516fe5dd498fa53a355b078f6b8c /sysdep/unix | |
parent | 387b279f605c096c6ecb16d6608c700c533edb13 (diff) |
Faster shutdown and cleanups by freeing route attributes strictly from main loop
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/coroutine.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |