pub fn new_count_waker() -> (Waker, AwokenCount)
Create a new Waker that counts the number of times it’s awoken.
Waker
use futures_test::task::new_count_waker; let (waker, count) = new_count_waker(); assert_eq!(count, 0); waker.wake_by_ref(); waker.wake(); assert_eq!(count, 2);