Type Definition conch_runtime::env::DefaultEnvConfig
[−]
[src]
type DefaultEnvConfig<T> = EnvConfig<ArgsEnv<T>, PlatformSpecificAsyncIoEnv, FileDescEnv<Rc<FileDesc>>, LastStatusEnv, VarEnv<T, T>, ExecEnv, VirtualWorkingDirEnv, T, RuntimeError>;
A default environment configuration using provided (non-atomic) implementations,
and powered by tokio
.
Generic over the representation of shell words, variables, function names, etc.
// Can be instantiated as follows let lp = tokio_core::reactor::Core::new().unwrap(); // Fallback to using one thread per CPU let cfg1 = DefaultEnvConfig::<Rc<String>>::new(lp.remote(), None); // Fallback to specific number of threads let cfg2 = DefaultEnvConfig::<Rc<String>>::new(lp.remote(), Some(2));
Methods
impl<T> DefaultEnvConfig<T> where
T: Eq + Hash + From<String>,
[src]
T: Eq + Hash + From<String>,
fn new(remote: Remote, fallback_num_threads: Option<usize>) -> IoResult<Self>
[src]
Creates a new DefaultEnvConfig
using default environment components.
A tokio
Remote
handle is required for performing async IO on
supported platforms. Otherwise, if the platform does not support
(easily) support async IO, a dedicated thread-pool will be used.
If no thread number is specified, one thread per CPU will be used.