-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
test: implement safe abstraction using the Wake
trait
#6898
base: master
Are you sure you want to change the base?
Conversation
This seems to contain two independent changes: using the |
Wake trait provides a safe abstraction for creating Waker from an Lines 59 to 61 in 9cc4a81
This reduces both boilerplate and, more importantly I'm really surprised that there isn't a Lines 209 to 212 in 9cc4a81
Lines 245 to 247 in 9cc4a81
Original implementation has This is my main reason to add It could also be useful as a basic future executor, similar to futures::executor::block_on |
We use |
This could be useful outside of Tokio test suites for general-purpose future execution. It's also well-suited for benchmarking asynchronous code due to its lightweight nature. In some cases, you may want to avoid a runtime. For example, when running tools like Miri, Most importantly original implementation has already support for it. Maybe we should consider replacing entire Line 230 in 161b8c8
|
No description provided.