Closed suningzh closed 2 months ago
You can try using it this way:
let mut lb = http_proxy_service(conf, self);
lb.threads = Some(10);
You can try using it this way:
let mut lb = http_proxy_service(conf, self); lb.threads = Some(10);
good idea
pingora-core/src/services/listening.rs has a struct named Service,it has a member threads, the threads is always None and we don't have a method to modify it, so when we run those services, they have same threads number which is come from conf.threads
while let Some(service) = self.services.pop() { let threads = service.threads().unwrap_or(conf.threads); let runtime = Server::run_service( service, self.listen_fds.clone(), self.shutdown_recv.clone(), threads, conf.work_stealing, ); runtimes.push(runtime); }