mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-30 18:44:36 +01:00
parent
dbfa13d6be
commit
e5b5df1261
@ -263,12 +263,14 @@ impl ServerBuilder {
|
|||||||
info!("Starting {} workers", self.threads);
|
info!("Starting {} workers", self.threads);
|
||||||
|
|
||||||
// start workers
|
// start workers
|
||||||
let mut workers = Vec::new();
|
let workers = (0..self.threads)
|
||||||
for idx in 0..self.threads {
|
.map(|idx| {
|
||||||
let worker = self.start_worker(idx, self.accept.get_notify());
|
let worker = self.start_worker(idx, self.accept.get_notify());
|
||||||
workers.push(worker.clone());
|
self.workers.push((idx, worker.clone()));
|
||||||
self.workers.push((idx, worker));
|
|
||||||
}
|
worker
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
|
||||||
// start accept thread
|
// start accept thread
|
||||||
for sock in &self.sockets {
|
for sock in &self.sockets {
|
||||||
|
Loading…
Reference in New Issue
Block a user