Skip to content

Add !Send server example - #115

Merged
cratelyn merged 6 commits into
hyperium:masterfrom
JanBerktold:not-send
Nov 5, 2026
Merged

cratelyn merged 6 commits into
hyperium:masterfrom
JanBerktold:not-send

Conversation

@JanBerktold

@JanBerktold JanBerktold commented Apr 9, 2024 •

Copy link
Copy Markdown
Contributor

I didn't realize the auto connection was ready to be used with a !Send executor, so I went down a long rabbit hole. This adds an example hopefully short-circuiting this process for future users.

  • The description, docs, and comments (words meant for humans) are written by a human, not by an LLM.

@jamesthurley

Copy link
Copy Markdown

Is there a reason this was closed without merging?

@JanBerktold JanBerktold reopened this Feb 15, 2025
@JanBerktold

Copy link
Copy Markdown
Contributor Author

I don't remember a good reason. I've re-opened, and resolved the merge conflict for @seanmonstar to take a look and accept it, if deemed useful.

@cratelyn cratelyn added S-waiting-on-review Status: waiting on review. A-examples Area: This makes changes to the `examples/` directory. labels Sep 24, 2026
@cratelyn
cratelyn self-requested a review September 24, 2026 18:50
JanBerktold and others added 6 commits November 4, 2026 16:08
`cargo check --features=full --examples` returns a number of warnings.

this commit fixes these warnings.

Signed-off-by: katelyn martin <git@katelyn.world>
this macro allows callers to specify the kind of runtime they wish to
use. we can use this, instead of laying out the boilerplate to do this
by hand, to provide a more concise example.

Signed-off-by: katelyn martin <git@katelyn.world>
this type isn't used in the example. we can remove it.

Signed-off-by: katelyn martin <git@katelyn.world>
in hyperium#330, we introduced a new executor that can spawn futures onto a
local runtime. this commit replaces the `LocalExec` type in the example
with this executor, to further distill this example.

Signed-off-by: katelyn martin <git@katelyn.world>
Signed-off-by: katelyn martin <git@katelyn.world>

@cratelyn cratelyn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks for opening this, and thank you for your patience, @JanBerktold! i pushed some additional changes to golf this down a bit further. i introduced a local executor in #330, so this example uses that executor instead now.

@cratelyn
cratelyn merged commit 885c965 into hyperium:master Nov 5, 2026
20 of 21 checks passed
@cratelyn cratelyn removed the S-waiting-on-review Status: waiting on review. label Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-examples Area: This makes changes to the `examples/` directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants