From 6393a0cc031f504dbd50eb4b021bae51e21f6140 Mon Sep 17 00:00:00 2001 From: David Cook Date: Mon, 26 Jul 2021 13:18:50 -0500 Subject: [PATCH] docs(ffi): fix copy-paste error on hyper_waker_wake (#2604) --- capi/include/hyper.h | 4 +++- src/ffi/task.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/capi/include/hyper.h b/capi/include/hyper.h index fc3b71e7..d969f973 100644 --- a/capi/include/hyper.h +++ b/capi/include/hyper.h @@ -718,7 +718,9 @@ struct hyper_waker *hyper_context_waker(struct hyper_context *cx); void hyper_waker_free(struct hyper_waker *waker); /* - Free a waker that hasn't been woken. + Wake up the task associated with a waker. + + NOTE: This consumes the waker. You should not use or free the waker afterwards. */ void hyper_waker_wake(struct hyper_waker *waker); diff --git a/src/ffi/task.rs b/src/ffi/task.rs index e3fb5f44..f92798f0 100644 --- a/src/ffi/task.rs +++ b/src/ffi/task.rs @@ -418,7 +418,9 @@ ffi_fn! { } ffi_fn! { - /// Free a waker that hasn't been woken. + /// Wake up the task associated with a waker. + /// + /// NOTE: This consumes the waker. You should not use or free the waker afterwards. fn hyper_waker_wake(waker: *mut hyper_waker) { let waker = unsafe { Box::from_raw(waker) }; waker.waker.wake();