-
Notifications
You must be signed in to change notification settings - Fork 933
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 support for IAsyncEnumerable #2267
Comments
I think it would have to be done for NHibernate 6.0, which may simply drop .Net Framework v4. (So the plan would then be to wait for .Net 5 and target this one for NHibernate 6.) Otherwise we may end-up with a lot of conditional compilation directives in code, because there is also |
Waiting for NHibernate 6.0 to add OT: |
Maybe there is a misunderstanding here: I do not see this as dropping .Net Framework, since we would target .Net 5, which is meant to be the successor of .Net Framework v4.8 (and of .Net Core 3 altogether). |
We can start using C# 8 now and add support of the interface in the current version. The interfaces are available in the compatibility package. To be able to do we need to deprecate |
The only problem I see now: we need a support from @maca88’s AsyncGenerator so we can start using the new C#8 syntactic sugar |
@hazzik Good point, I forgot about the compatability package (Microsoft.Bcl.AsyncInterfaces). Thanks for mentioning it! @fredericDelaporte Dropping .NET Framework 2.0/3.5 was not a huge deal because updating a solution from 2.0/3.5 to 4.0 was as easy as changing the target framework most of the time. In contrast, switching from .NET Framework to .NET 5 will be at least as much work as it is now to switch to .NET Standard/.NET Core. I know that .NET Framework support has to be dropped sometime. But I wouldn't do it in the foreseeable future. |
By adding |
Obviously not. What I mean is that we need AsyncGenerator support to start using C#8 regardless of async enumerables feature. |
I agreee, my current plan is to start working on it after 5.3 release. |
I understand that this might still be far away and not finally decided, but is this feature still planned for NHibernate 6.0? If yes, could someone please assign it to the "next major" milestone? |
It all depends on |
what is the status of this feature? |
1 similar comment
what is the status of this feature? |
C# 8.0 and .NET Standard 2.1 brought us asynchronous streams (horrible name, I'll call them "async enumerables" from now on). It would be nice if NHibernate could add new methods that return an
IAsyncEnumerable<T>
. This would allow us to iterate over the results withawait foreach
.I know this won't be a simple task and will require a few preparation steps, like adding .NET Standard 2.1 (and maybe .NET Core 3.0) targets to the build process. (
Maybe this would even be the first time that NHibernate has a different API across target frameworks?edit: .NET Standard 2.0 and .NET Framework supportIAsyncEnumerable
with Microsoft.Bcl.AsyncInterfaces.) But I thought that this issue could at least be a tracking issue for the overall progress.The text was updated successfully, but these errors were encountered: