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

spawn-ready: Avoid oneshot allocations #538

Merged
merged 3 commits into from
Jan 19, 2021

Conversation

olix0r
Copy link
Collaborator

@olix0r olix0r commented Jan 19, 2021

This change modifies the SpawnReady service to track a
tokio::task::JoinHandle instead of creating a tokio::sync::oneshot
on each pending poll. This avoid unnecessary allocation.

The spawn_ready test is also fixed to avoid using thread::sleep,
instead using tokio::time::pause.

This change modifies the `SpawnReady` service to track a
`tokio::task::JoinHandle` instead of creating a `tokio::sync::oneshot`
on each pending poll. This avoid unnecessary allocation.

The `spawn_ready` test is also fixed to avoid using `thread::sleep`,
instead using `tokio::time::pause`.
@olix0r olix0r merged commit f2bb123 into tower-rs:master Jan 19, 2021
@olix0r olix0r deleted the ver/spawn-ready-no-oneshot branch January 19, 2021 18:12
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.

None yet

2 participants