mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
runtime: move is_join_waker_set
assertion in unset_waker
(#7072)
This commit is contained in:
parent
15f73666f1
commit
bd3e857737
@ -446,12 +446,15 @@ impl State {
|
||||
pub(super) fn unset_waker(&self) -> UpdateResult {
|
||||
self.fetch_update(|curr| {
|
||||
assert!(curr.is_join_interested());
|
||||
assert!(curr.is_join_waker_set());
|
||||
|
||||
if curr.is_complete() {
|
||||
return None;
|
||||
}
|
||||
|
||||
// If the task is completed, this bit may have been unset by
|
||||
// `unset_waker_after_complete`.
|
||||
assert!(curr.is_join_waker_set());
|
||||
|
||||
let mut next = curr;
|
||||
next.unset_join_waker();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user