Closed
Conversation
Contributor
Author
|
@bagder ready for merge, next in line. Will continue on Monday with the other ones. |
Member
🔒 Aisle Security AnalysisWe found 1 potential security issue(s) in this PR:
See details in the comment below. Analyzed PR: #20916 at commit Last updated on: 2026-03-21T22:01:31Z |
There was a problem hiding this comment.
Pull request overview
Adds new internal thread pool (Curl_thrdpool) and thread queue (Curl_thrdq) implementations to support asynchronous work item processing, along with unit tests and internal documentation.
Changes:
- Introduce
lib/thrdpool.*andlib/thrdqueue.*plus build integration. - Add unit tests
unit3300/unit3301and register them in the test harness. - Extend tracing/threads infrastructure (condvar wrappers +
Curl_trc_feat_infof) and add internal documentation.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/unit3301.c | Adds unit tests for thread queue behavior (send/process/recv + event callback). |
| tests/unit/unit3300.c | Adds unit tests for thread pool behavior (min/max threads, signaling, destroy modes). |
| tests/unit/Makefile.inc | Registers new unit test sources in the unit test bundle. |
| tests/data/test3301 | Adds test case metadata for unit3301. |
| tests/data/test3300 | Adds test case metadata for unit3300. |
| tests/data/Makefile.am | Registers new test case data files for distribution. |
| lib/thrdqueue.h | Defines the thread queue API and callbacks. |
| lib/thrdqueue.c | Implements the thread queue using llist + thread pool. |
| lib/thrdpool.h | Defines the thread pool API and callbacks. |
| lib/thrdpool.c | Implements the thread pool with worker slots, signaling, and idle waiting. |
| lib/curl_threads.h | Adds cross-platform condition-variable types and APIs under USE_MUTEX. |
| lib/curl_threads.c | Implements cross-platform condition-variable wrappers (signal/wait/timedwait). |
| lib/curl_trc.h | Declares Curl_trc_feat_infof() for feature-based verbose logging. |
| lib/curl_trc.c | Implements Curl_trc_feat_infof(). |
| lib/memdebug.c | Ensures memdebug cleanup unlocks after closing the logfile. |
| lib/Makefile.inc | Adds new lib sources/headers to the build source lists. |
| docs/internals/THRDPOOL+QUEUE.md | Documents thread pool/queue design, operation, and safety notes. |
| docs/Makefile.am | Registers the new internal documentation page. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- new source files for thread pool and queue - test cases 3217 and 3218 for them - internal documentation
…HREADS and USE_MUTEX where applicable
bagder
approved these changes
Mar 23, 2026
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.
Uh oh!
There was an error while loading. Please reload this page.