summaryrefslogtreecommitdiff
path: root/cli/state.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-01-18 00:43:53 +0100
committerRy Dahl <ry@tinyclouds.org>2020-01-17 18:43:53 -0500
commit5fa056e53be6d17ab746629ea0eaa89fe817141b (patch)
treec32c4ab39577a2dc14da3843e3223395c5a7ea54 /cli/state.rs
parentd7203092039d3c46ca8480ff8eecf612deb2b2f6 (diff)
workers: minimal error handling and async module loading (#3665)
Diffstat (limited to 'cli/state.rs')
-rw-r--r--cli/state.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/state.rs b/cli/state.rs
index a4974958b..ed7b8e438 100644
--- a/cli/state.rs
+++ b/cli/state.rs
@@ -53,6 +53,7 @@ pub struct State {
pub metrics: Metrics,
pub global_timer: Mutex<GlobalTimer>,
pub workers: Mutex<HashMap<u32, Worker>>,
+ pub loading_workers: Mutex<HashMap<u32, mpsc::Receiver<Result<(), ErrBox>>>>,
pub next_worker_id: AtomicUsize,
pub start_time: Instant,
pub seeded_rng: Option<Mutex<StdRng>>,
@@ -248,6 +249,7 @@ impl ThreadSafeState {
metrics: Metrics::default(),
global_timer: Mutex::new(GlobalTimer::new()),
workers: Mutex::new(HashMap::new()),
+ loading_workers: Mutex::new(HashMap::new()),
next_worker_id: AtomicUsize::new(0),
start_time: Instant::now(),
seeded_rng,