Skip to content

Conversation

@FractalBoy
Copy link
Owner

Rather than peppering code with calls to Future->retain(), this returns a future back to the server for it to await.

In some cases, returning a future would be too difficult, so we call ->get or ->await to get the result.

Additionally, now that we can return a future to the server, it should be able to process requests that have already been read into the read buffer faster (and present in $buffref), since calling ->get or ->await will only return control to the main server read function when there is more data to be read (not when the data has already been read but not parsed).

@FractalBoy FractalBoy force-pushed the use-futures-efficiently branch from a7d4931 to 6730db9 Compare February 26, 2025 04:34
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.

2 participants