Skip to content

Commit 6393a0c

Browse files
docs(ffi): fix copy-paste error on hyper_waker_wake (#2604)
1 parent 19f38b3 commit 6393a0c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

capi/include/hyper.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,9 @@ struct hyper_waker *hyper_context_waker(struct hyper_context *cx);
718718
void hyper_waker_free(struct hyper_waker *waker);
719719

720720
/*
721-
Free a waker that hasn't been woken.
721+
Wake up the task associated with a waker.
722+
723+
NOTE: This consumes the waker. You should not use or free the waker afterwards.
722724
*/
723725
void hyper_waker_wake(struct hyper_waker *waker);
724726

src/ffi/task.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,9 @@ ffi_fn! {
418418
}
419419

420420
ffi_fn! {
421-
/// Free a waker that hasn't been woken.
421+
/// Wake up the task associated with a waker.
422+
///
423+
/// NOTE: This consumes the waker. You should not use or free the waker afterwards.
422424
fn hyper_waker_wake(waker: *mut hyper_waker) {
423425
let waker = unsafe { Box::from_raw(waker) };
424426
waker.waker.wake();

0 commit comments

Comments
 (0)