mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
aquatic_http: work on glommio request handlers
This commit is contained in:
parent
4fc1509a79
commit
8f0dabc706
6 changed files with 311 additions and 40 deletions
|
|
@ -5,6 +5,7 @@ use glommio::{channels::channel_mesh::MeshBuilder, prelude::*};
|
|||
|
||||
use crate::config::Config;
|
||||
|
||||
mod common;
|
||||
mod handlers;
|
||||
mod network;
|
||||
|
||||
|
|
@ -59,6 +60,34 @@ pub fn run(
|
|||
executors.push(executor);
|
||||
}
|
||||
|
||||
for i in 0..(config.request_workers) {
|
||||
let config = config.clone();
|
||||
let request_mesh_builder = request_mesh_builder.clone();
|
||||
let response_mesh_builder = response_mesh_builder.clone();
|
||||
let access_list = access_list.clone();
|
||||
|
||||
let mut builder = LocalExecutorBuilder::default();
|
||||
|
||||
// if config.core_affinity.set_affinities {
|
||||
// builder =
|
||||
// builder.pin_to_cpu(config.core_affinity.offset + 1 + config.socket_workers + i);
|
||||
// }
|
||||
|
||||
let executor = builder.spawn(|| async move {
|
||||
handlers::run_request_worker(
|
||||
config,
|
||||
request_mesh_builder,
|
||||
response_mesh_builder,
|
||||
access_list,
|
||||
)
|
||||
.await
|
||||
});
|
||||
|
||||
executors.push(executor);
|
||||
}
|
||||
|
||||
// drop_privileges_after_socket_binding(&config, num_bound_sockets).unwrap();
|
||||
|
||||
for executor in executors {
|
||||
executor
|
||||
.expect("failed to spawn local executor")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue