wip: test: Server-side thread pool#24
Closed
rustaceanrob wants to merge 1 commit into
Closed
Conversation
rustaceanrob
commented
Jun 2, 2026
| #[tokio::test] | ||
| #[serial_test::parallel] | ||
| async fn mining_via_pool_concurrent_queries() { | ||
| with_init_client_and_thread_map(|client, thread_map, _thread| async move { |
Member
Author
There was a problem hiding this comment.
@plebhash @Shourya742 can you guys have a look at the result here and provide feedback on bitcoin-core/libmultiprocess#283 if any?
Member
Author
|
xyzconstant/peer-observer@c67385a was more helpful for demonstration. |
ryanofsky
added a commit
to bitcoin-core/libmultiprocess
that referenced
this pull request
Jul 5, 2026
0e49d91 Add `makePool` method on `ThreadMap` (rustaceanrob) Pull request description: This patch introduces a pool of threads to the `Connection` class, and allows this pool to be populated with the thread map via `makePool`. When a client thread is not set in a request context, it is delegated to the pool. This is unable to handle the guarentees with server-invoked callbacks that the current API offers, but these callbacks are not yet present in the interface. The pool is implemented as ~round-robin as it is simplest~ shortest queue, but perhaps the pool could be a queue of requests with work-stealing for threads that are available. This was raised to me by Rust users, as they did not particularly care where work is executed on the server-side, but they have to set the thread regardless. Tests in Rust can be seen here: 2140-dev/bitcoin-capnp-types#24 ref: https://github.com/2140-dev/bitcoin-capnp-types/blob/master/tests/util/bitcoin_core.rs#L149 ref: #281 ACKs for top commit: xyzconstant: re-ACK 0e49d91 ViniciusCestarii: re-ACK 0e49d91 ryanofsky: Code review ACK 0e49d91 just tweaking pool thread names since last review Tree-SHA512: 560de2f2ee335f61addf25c6d50ba2e4b983280bf2098cbb85a8ae8da2c5439579d8ccac00543247c106d2e6ba3cabe87b2db0f22d86a8bf78044d1be94cc757
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requires: bitcoin-core/libmultiprocess#283