Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions core/server/src/shard_allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ pub struct ShardInfo {
impl ShardInfo {
/// Pin the calling thread to this shard's cores. On non-Linux this
/// does nothing (no-op). Empty core set also does nothing.
#[cfg_attr(
not(target_os = "linux"),
allow(
clippy::unused_self,
clippy::unnecessary_wraps,
reason = "Keep the same API as the fallible Linux binding implementation"
)
)]
pub fn bind_cpu(&self) -> Result<(), ShardingError> {
#[cfg(target_os = "linux")]
{
Expand Down Expand Up @@ -241,6 +249,14 @@ impl ShardInfo {
/// Pin the calling thread's memory to this shard's NUMA node so
/// allocations stay local and fast. Does nothing if no node is set.
/// On non-Linux this does nothing (no-op), mirroring [`Self::bind_cpu`].
#[cfg_attr(
not(target_os = "linux"),
allow(
clippy::unused_self,
clippy::unnecessary_wraps,
reason = "Keep the same API as the fallible Linux binding implementation"
)
)]
pub fn bind_memory(&self) -> Result<(), ShardingError> {
#[cfg(target_os = "linux")]
{
Expand Down
Loading