Split tokio-threadpool lib.rs into files (#233)

* Builder -> src/builder.rs
* Callback -> src/callback.rs
* Config -> src/config.rs
* Futures2Wake -> src/futures2_wake.rs
* Inner -> src/inner.rs
* Notifier-> src/notifier.rs
* Sender -> src/sender.rs
* Shutdown -> src/shutdown.rs
* ShutdownTask -> src/shutdown_task.rs
* SleepStack -> src/sleep_stack.rs
* State -> src/state.rs
* ThreadPool -> src/thread_pool.rs
* Worker -> src/worker.rs
* WorkerEntry -> src/worker_entry.rs
* WorkerState -> src/worker_state.rs
This commit is contained in:
Roman
2018-03-27 15:56:21 -07:00
committed by Carl Lerche
parent a612736f54
commit ad189826f4
17 changed files with 2374 additions and 2257 deletions
+18
View File
@@ -0,0 +1,18 @@
use callback::Callback;
use std::time::Duration;
/// Thread pool specific configuration values
#[derive(Debug, Clone)]
pub(crate) struct Config {
pub keep_alive: Option<Duration>,
// Used to configure a worker thread
pub name_prefix: Option<String>,
pub stack_size: Option<usize>,
pub around_worker: Option<Callback>,
}
/// Max number of workers that can be part of a pool. This is the most that can
/// fit in the scheduler state. Note, that this is the max number of **active**
/// threads. There can be more standby threads.
pub(crate) const MAX_WORKERS: usize = 1 << 15;