mirror of
https://github.com/nushell/nushell.git
synced 2025-06-19 17:38:14 +02:00
Add feature check to std::time::Instant for wasm in jobs
This commit is contained in:
parent
37b69b8c4c
commit
107fef44c4
@ -4,9 +4,11 @@ use std::{
|
||||
mpsc::{Receiver, RecvTimeoutError, Sender},
|
||||
Arc, Mutex,
|
||||
},
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use nu_system::{kill_by_pid, UnfreezeHandle};
|
||||
|
||||
use crate::{Signals, Value};
|
||||
@ -256,6 +258,7 @@ impl Mailbox {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub fn recv_timeout(
|
||||
&mut self,
|
||||
filter_tag: Option<Tag>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user