aboutsummaryrefslogtreecommitdiff
path: root/src/threadpool.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/threadpool.c')
-rw-r--r--src/threadpool.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/threadpool.c b/src/threadpool.c
index a3da5302..42322ebb 100644
--- a/src/threadpool.c
+++ b/src/threadpool.c
@@ -275,9 +275,13 @@ void uv__work_submit(uv_loop_t* loop,
}
+/* TODO(bnoordhuis) teach libuv how to cancel file operations
+ * that go through io_uring instead of the thread pool.
+ */
static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) {
int cancelled;
+ uv_once(&once, init_once); /* Ensure |mutex| is initialized. */
uv_mutex_lock(&mutex);
uv_mutex_lock(&w->loop->wq_mutex);