[][src]Function futures_test::task::new_count_waker

pub fn new_count_waker() -> (LocalWaker, AwokenCount)

Create a new LocalWaker that counts the number of times it's awoken.

Examples

#![feature(futures_api)]
use futures_test::task::new_count_waker;

let (lw, count) = new_count_waker();

assert_eq!(count, 0);

lw.wake();
lw.wake();

assert_eq!(count, 2);