Type Definition conch_runtime::env::atomic::DefaultEnvConfig
[−]
[src]
type DefaultEnvConfig<T> = EnvConfig<ArgsEnv<T>, PlatformSpecificAsyncIoEnv, FileDescEnv<Arc<FileDesc>>, LastStatusEnv, VarEnv<T, T>, ExecEnv, VirtualWorkingDirEnv, T, RuntimeError>;
A default environment configuration using provided (atomic) implementations.
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::<Arc<String>>::new_atomic(lp.remote(), None); // Fallback to specific number of threads let cfg2 = DefaultEnvConfig::<Arc<String>>::new_atomic(lp.remote(), Some(2));
Methods
impl<T> DefaultAtomicEnvConfig<T> where
T: Eq + Hash + From<String>,
[src]
T: Eq + Hash + From<String>,
fn new_atomic(
remote: Remote,
fallback_num_threads: Option<usize>
) -> IoResult<Self>
[src]
remote: Remote,
fallback_num_threads: Option<usize>
) -> IoResult<Self>
Creates a new atomic::DefaultConfig
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.