<commit_before>use futures::executor::block_on;
use futures::future::{self, FutureExt, BoxFuture};
use std::sync::mpsc;
use std::thread;

#[test]
fn lots() {
    fn do_it(input: (i32, i32)) -> BoxFuture<'static, i32> {
        let (n, x) = input;
        if n == 0 {
            future::ready(x).boxed()
        } else {
            future::ready((n - 1, x + n)).then(do_it).boxed()
        }
    }

    let (tx, rx) = mpsc::channel();
    thread::spawn(|| {
        block_on(do_it((1_000, 0)).map(move |x| tx.send(x).unwrap()))
    });
    assert_eq!(500_500, rx.recv().unwrap());
}
<commit_msg>futures: tests/ready_queue.rs: Don't break w/o "executor"<commit_after>#[cfg(feature = "executor")] // executor::
#[test]
fn lots() {
    use futures::executor::block_on;
    use futures::future::{self, FutureExt, BoxFuture};
    use std::sync::mpsc;
    use std::thread;

    fn do_it(input: (i32, i32)) -> BoxFuture<'static, i32> {
        let (n, x) = input;
        if n == 0 {
            future::ready(x).boxed()
        } else {
            future::ready((n - 1, x + n)).then(do_it).boxed()
        }
    }

    let (tx, rx) = mpsc::channel();
    thread::spawn(|| {
        block_on(do_it((1_000, 0)).map(move |x| tx.send(x).unwrap()))
    });
    assert_eq!(500_500, rx.recv().unwrap());
}

{'fraction_non_alphanumeric': 0.21003861003861005, 'fraction_numerical': 0.029343629343629343, 'mean_word_length': 2.702857142857143, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2816219', 'n_tokens_mistral': 517, 'n_tokens_neox': 495, 'n_words': 94}