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

Async Serve Command #3190

Merged
merged 8 commits into from May 13, 2024
Merged

Async Serve Command #3190

merged 8 commits into from May 13, 2024

Conversation

0xTim
Copy link
Member

@0xTim 0xTim commented May 10, 2024

These changes are now available in 4.99.3

Migrate ServeCommand to an AsyncCommand to enable proper custom executor support and remove any calls to wait()

@0xTim 0xTim added the semver-patch Internal changes only label May 10, 2024
@0xTim 0xTim requested a review from gwynne as a code owner May 10, 2024 16:56
@0xTim
Copy link
Member Author

0xTim commented May 10, 2024

Need to work out why the configuration has broken in the tests

@0xTim
Copy link
Member Author

0xTim commented May 10, 2024

Verified this works with vapor/template#131 with Leaf and Fluent and all working

headers: request.headers
)
clientRequest.body = .byteBuffer(request.body)
let response = try await client.execute(request: clientRequest).get()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is .get() needed here? HTTPClient has an async version of execute() (with different argument labels).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

@gwynne gwynne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit

@0xTim
Copy link
Member Author

0xTim commented May 13, 2024

@gwynne this is ready for you now I think

@0xTim 0xTim merged commit 5bc1dfa into main May 13, 2024
15 of 16 checks passed
@0xTim 0xTim deleted the async-serve branch May 13, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch Internal changes only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants