mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Move CoreAffinityConfig to aquatic_common, use in glommio http
This commit is contained in:
parent
8747f8de4e
commit
d659117ae5
7 changed files with 37 additions and 23 deletions
17
aquatic_common/src/cpu_pinning.rs
Normal file
17
aquatic_common/src/cpu_pinning.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use serde::{Serialize, Deserialize};
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct CoreAffinityConfig {
|
||||
pub set_affinities: bool,
|
||||
pub offset: usize,
|
||||
}
|
||||
|
||||
impl Default for CoreAffinityConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
set_affinities: false,
|
||||
offset: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ use indexmap::IndexMap;
|
|||
use rand::Rng;
|
||||
|
||||
pub mod access_list;
|
||||
pub mod cpu_pinning;
|
||||
|
||||
/// Peer or connection valid until this instant
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue