#[cfg(not(target_arch = "wasm32"))]
use std::time::Duration;
#[cfg(target_arch = "wasm32")]
use web_time::Duration;
#[cfg(not(target_arch = "wasm32"))]
use std::thread;
#[cfg(target_arch = "wasm32")]
use wasm_safe_thread as thread;
#[cfg(target_arch = "wasm32")]
wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser);
fn main() {
test_executors::sleep_on(test())
}
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)]
async fn test() {
let (s, r) = std::sync::mpsc::channel();
let (s2, r2) = r#continue::continuation();
thread::spawn(move || {
r.recv_timeout(Duration::from_millis(500)).unwrap();
std::process::exit(0);
});
app_window::application::main(move || {
s.send(()).unwrap();
s2.send(());
});
r2.await;
}