-
-
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
Conversation
This seems to contain two independent changes: using the |
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
|
Right now,
It can't benchmark anything other than pure computation. At that point, why is it async at all? Using async in benchmarks is fraught with issues and very difficult to do right. More importantly, the purpose of
Why should we make As a more general concern, your PR makes two different changes:
I'm skeptical about adding a |
You're absolutely right, It's primarily intended for testing raw computation. Some library provide only async version (for simplicity
Perhaps we don't need
Let's remove that feature for now. |
No description provided.