Lines Matching refs:tasks
16 let mut tasks = FuturesUnordered::new(); in is_terminated() localVariable
18 assert_eq!(tasks.is_terminated(), false); in is_terminated()
19 assert_eq!(tasks.poll_next_unpin(&mut cx), Poll::Ready(None)); in is_terminated()
20 assert_eq!(tasks.is_terminated(), true); in is_terminated()
23 assert_eq!(tasks.is_empty(), true); in is_terminated()
24 assert_eq!(tasks.len(), 0); in is_terminated()
25 assert_eq!(tasks.iter_mut().len(), 0); in is_terminated()
27 tasks.push(future::ready(1)); in is_terminated()
29 assert_eq!(tasks.is_empty(), false); in is_terminated()
30 assert_eq!(tasks.len(), 1); in is_terminated()
31 assert_eq!(tasks.iter_mut().len(), 1); in is_terminated()
33 assert_eq!(tasks.is_terminated(), false); in is_terminated()
34 assert_eq!(tasks.poll_next_unpin(&mut cx), Poll::Ready(Some(1))); in is_terminated()
35 assert_eq!(tasks.is_terminated(), false); in is_terminated()
36 assert_eq!(tasks.poll_next_unpin(&mut cx), Poll::Ready(None)); in is_terminated()
37 assert_eq!(tasks.is_terminated(), true); in is_terminated()
360 let mut tasks = FuturesUnordered::from_iter(vec![F::default(); 10]); in polled_only_once_at_most_per_iteration() localVariable
361 assert!(tasks.poll_next_unpin(cx).is_pending()); in polled_only_once_at_most_per_iteration()
362 assert_eq!(10, tasks.iter().filter(|f| f.polled).count()); in polled_only_once_at_most_per_iteration()
364 let mut tasks = FuturesUnordered::from_iter(vec![F::default(); 33]); in polled_only_once_at_most_per_iteration() localVariable
365 assert!(tasks.poll_next_unpin(cx).is_pending()); in polled_only_once_at_most_per_iteration()
366 assert_eq!(33, tasks.iter().filter(|f| f.polled).count()); in polled_only_once_at_most_per_iteration()
368 let mut tasks = FuturesUnordered::<F>::new(); in polled_only_once_at_most_per_iteration() localVariable
369 assert_eq!(Poll::Ready(None), tasks.poll_next_unpin(cx)); in polled_only_once_at_most_per_iteration()