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

time: enforce current_thread rt for time::pause #3289

Merged
merged 2 commits into from
Dec 17, 2020

Conversation

carllerche
Copy link
Member

Pausing time is a capability added to assist with testing Tokio code
dependent on time. Currently, the capability implicitly requires the
current_thread runtime.

This change enforces the requirement by panicking if called from a
multi-threaded runtime.

Pausing time is a capability added to assist with testing Tokio code
dependent on time. Currently, the capability implicitly requires the
current_thread runtime.

This change enforces the requirement by panicking if called from a
multi-threaded runtime.
@carllerche carllerche added this to the v1.0 milestone Dec 17, 2020
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-time Module: tokio/time M-runtime Module: tokio/runtime labels Dec 17, 2020
@carllerche carllerche merged commit abd4c00 into master Dec 17, 2020
@carllerche carllerche deleted the reduce-time-pause-scope branch December 17, 2020 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime M-time Module: tokio/time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants