#[macro_export]
macro_rules! big_stack_test {
($what_do:expr, $size:literal) => {
tokio::runtime::Builder::new_multi_thread()
.thread_stack_size($size)
.enable_all()
.build()
.unwrap()
.block_on(async move {
tokio::task::spawn(tokio::time::timeout(
std::time::Duration::from_secs(60),
$what_do,
))
.await
.unwrap()
})
.unwrap()
};
($what_do:expr) => {
$crate::big_stack_test!($what_do, 11_000_000)
};
}