Skip to content

Enable thread-pools to be pinned to CPUs#3557

Merged
glbrntt merged 2 commits intoapple:mainfrom
Lukasa:cb-thread-pool-pinning
Mar 23, 2026
Merged

Enable thread-pools to be pinned to CPUs#3557
glbrntt merged 2 commits intoapple:mainfrom
Lukasa:cb-thread-pool-pinning

Conversation

@Lukasa
Copy link
Copy Markdown
Contributor

@Lukasa Lukasa commented Mar 22, 2026

Motivation:

Similar to MultiThreadedEventLoopGroup, it is useful in some NUMA circumstances to be able to pin thread pools to specific CPUs. This can minimise the overheads of moving memory around across NUMA nodes.

Modifications:

Added a pinned CPUs initializer to NIOThreadPool

Result:

Users have more flexibility.

Motivation:

Similar to MultiThreadedEventLoopGroup, it is useful in some
NUMA circumstances to be able to pin thread pools to specific
CPUs. This can minimise the overheads of moving memory around
across NUMA nodes.

Modifications:

Added a pinned CPUs initializer to NIOThreadPool

Result:

Users have more flexibility.
@Lukasa Lukasa added the 🆕 semver/minor Adds new public API. label Mar 22, 2026
@glbrntt glbrntt merged commit bdf004b into apple:main Mar 23, 2026
52 of 53 checks passed
@Lukasa Lukasa deleted the cb-thread-pool-pinning branch March 23, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🆕 semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants