diff --git a/Cargo.lock b/Cargo.lock index 726424299e..ee9d3ddd48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2719,6 +2719,16 @@ name = "utf8-ranges" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "uvth" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "vec_map" version = "0.8.1" @@ -2791,7 +2801,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "scan_fmt 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "specs 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)", - "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uvth 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "vek 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)", "veloren-common 0.2.0", "veloren-world 0.2.0", @@ -3356,6 +3366,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" "checksum utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9d50aa7650df78abf942826607c62468ce18d9019673d4a2ebe1865dbb96ffde" +"checksum uvth 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cb04cfcc1b40fdb315b31778a8495785a436238f8c1d7c440daa0656e8c1f54a" "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" "checksum vek 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)" = "41a272c9a959b8d3acd4fdbb83bb20d815976e3ab68b3fa9e0c9519b5dd18478" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" diff --git a/server/Cargo.toml b/server/Cargo.toml index 08b074f898..6f23cca7c3 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -11,6 +11,6 @@ world = { package = "veloren-world", path = "../world" } log = "0.4" specs = "0.14" vek = "0.9" -threadpool = "1.7" +uvth = "3" lazy_static = "1.3.0" -scan_fmt = "0.1.3" \ No newline at end of file +scan_fmt = "0.1.3" diff --git a/server/src/lib.rs b/server/src/lib.rs index 702a13e286..acf7d72b41 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -30,7 +30,7 @@ use std::{ sync::{mpsc, Arc}, time::Duration, }; -use threadpool::ThreadPool; +use uvth::{ThreadPool, ThreadPoolBuilder}; use vek::*; use world::World; @@ -93,9 +93,7 @@ impl Server { postoffice: PostOffice::bind(addrs.into())?, clients: Clients::empty(), - thread_pool: threadpool::Builder::new() - .thread_name("veloren-worker".into()) - .build(), + thread_pool: ThreadPoolBuilder::new().name("veloren-worker".into()).build(), chunk_tx, chunk_rx, pending_chunks: HashSet::new(),