-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ManuallyDrop for WakerRef to use same vtable as normal Waker
This makes `Waker::will_wake` work between `task::waker_ref` and `Wakers` cloned from it (or created by `task::waker`). As `WakerRef` no longer stores an actual waker reference, `WakerRef::new` takes now a reference instead of ownership. Replaces `waker_vtable!` with a `waker_vtable<W>()` function, hopefully making the returned vtable pointer (more) stable. This also removes the safety guard "wake_unreachable" - but after all it should have been unreachable in the first place.
- Loading branch information
Showing
5 changed files
with
58 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters