Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http/client: Pass abort source by pointer #2650

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xemul
Copy link
Contributor

@xemul xemul commented Feb 20, 2025

Currently the client API suggest passing it by reference and for those, that don't want to abort requests there's 2nd set of calls that don't have abort source at all. Internally the reference is converted into a pointer, and the 2nd set of calls passes nullptr.

At the same time users of this API (scylla S3 client) make the reverse "choice" -- it passes abort source by pointer all the way down to http client and then decides which API to call, with abort source reference or without it.

Fix this mess by making client accept abort source by pointer.

Currently the client API suggest passing it by reference and for those,
that don't want to abort requests there's 2nd set of calls that don't
have abort source at all. Internally the reference is converted into a
pointer, and the 2nd set of calls passes nullptr.

At the same time users of this API (scylla S3 client) make the reverse
"choice" -- it passes abort source by pointer all the way down to http
client and then decides which API to call, with abort source reference
or without it.

Fix this mess by making client accept abort source by pointer.

Signed-off-by: Pavel Emelyanov <[email protected]>
@xemul xemul requested review from nyh and kreuzerkrieg February 20, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant