-
-
Notifications
You must be signed in to change notification settings - Fork 985
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
Add IAsyncEnumerable support for Consumer #1808
Comments
I'm guessing you mean when returning |
Yes @timcassell you are correct. |
In that case, this looks like a great candidate for a follow-up to my suggestion for fixing ValueTasks. #1595 (comment) Which is refactoring the engine to use an [Edit] Note that this feature cannot be implemented without fixing ValueTasks, as the API relies on ValueTasks. |
For completeness, this should also include |
I can take this if #2111 gets merged. |
Any progress on this one? I am actually trying to compare I am happy to give a hand with implementation if someone would guide me. If this is not something of an interest anymore, can someone just clarify how to properly consume I am now consuming IAsyncEnumerable by having one line at the end of the method.
Would that do the measurement somehow relevant to Thanks for a response and great work on improvements! |
Unfortunately, this isn't possible to implement correctly without the async refactor.
|
@timcassell Thanks for a quick reply! I do not care about the overhead that much. I may say I do care about comparing cases when it is better to use one over another( I am basically exploring If you are interested in the case, there is a branch develop/1.0. There are benchmarks and implementation of sync and async Google Polyline Algorithm. I am just playing around with it to compare how things work, what performs better in which case, to just understand things better. Thanks for the previous reply, @timcassell! |
You're right, it should. Which is exactly what the refactor aims to achieve. However, it is not a high priority for the other maintainers, so it hasn't been reviewed so far. To get the best apples-to-apples comparison today, you can configure your benchmarks like this: [Benchmark]
public async Task Blocking()
{
await Task.Yield();
// Do synchronous work here.
}
[Benchmark]
public async Task NonBlocking()
{
await Task.Yield();
// Do async work here.
} |
Those things are from 2022...I do understand the focus is elsewhere. The priorities too. I do understand how hard is to maintain things. Can I help with anything? I mean, it is really hard to contribute to something in case you don't have clear understanding where it should go and there are issues for years. Happy to help, but I need at least something. |
Yes, the PR is old, and I haven't updated it in a while since it had no interest from others. I think you commenting here showing your interest is already helpful. Maybe the other maintainers will take notice. If you want to help more, you could try reviewing #2111 yourself (and maybe #2349, which shows how I have thought about implementing this). |
Will take a look over the weekend. If you don't mind, I will tag you in my responses. Thank you! |
@timcassell Hey Tim. I took a look at those two PR of yours. I am afraid I am not knowledgeable enough to evaluate if that is something benchmarkdotnet should go with or not. There needs to be quite a lot of understanding of the internals which I do not have at the moment :/ I will stick for the solution I have now. Sorry I couldn't help with those PR. Let's hope it will become more relevant in the future and maintainers put higher priority to it. |
Please, add IAsyncEnumerable to list of Consume targets.
The text was updated successfully, but these errors were encountered: