Repository navigation
refactor(http): shared non-blocking libcurl reactor - #229
Merged
MisterVVP merged 4 commits intoAug 29, 2026
Conversation
MisterVVP
marked this pull request as draft
August 28, 2026 20:11
MisterVVP
marked this pull request as ready for review
August 29, 2026 08:54
MisterVVP
merged commit Aug 29, 2026
19f3b5f
into
dev-make-libcurl-streaming-cancellation-event-driven
19 checks passed
MisterVVP
deleted the
dev-implement-shared-non-blocking-libcurl-reactor
branch
August 29, 2026 08:54
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.
Motivation
epoll,eventfd, andtimerfdand preserve synchronousa2a::http::Client::StreamRequest()semantics while keeping custom requester compatibility.Description
CurlStreamReactorthat owns oneCURLM*, a reactor thread, a synchronized command queue, active transfer registrations, and shutdown state, and that serializesAdd/Cancel/Shutdowncommands to the reactor thread (implemented insrc/http/http_client.cpp).epoll+eventfdwakeups +timerfdand forwarded socket/timer events intocurl_multi_socket_action()without fixed polling intervals; added a portable fallback that uses libcurl multi wakeups on non-Linux platforms.PerformStreamingTransfernow enqueues aTransferwith the client reactor and waits on the transfer completion condition instead of creating a per-streamCURLMand blocking per-stream polling.Clientnow creates/holds a shared reactor (state_->stream_reactor).curl_multi_*ownership/cleanup and updated stream slot acquisition to only create per-easy handle slots; documented the default HTTP reactor behavior indocs/streaming-usage.md.