Skip to content

Commit 1639d70

Browse files
committed
Fix off-by-one in current thread waker refcount
1 parent 9120c83 commit 1639d70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/native/global.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,5 @@ fn raw_drop(ptr: *const ()) {
102102

103103
fn current_thread_waker() -> Waker {
104104
let thread = Arc::new(thread::current());
105-
unsafe { Waker::from_raw(raw_clone(Arc::into_raw(thread) as *const ())) }
105+
unsafe { Waker::from_raw(RawWaker::new(Arc::into_raw(thread) as *const (), &VTABLE)) }
106106
}

0 commit comments

Comments
 (0)