Proposal: support custom async iterator method builder #3629
Unanswered
neuecc
asked this question in
Language Ideas
Replies: 1 comment
-
I was just looking at adding this to my Promise library, only to find out it's not possible. Now I see your proposal from a year ago! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
await foreach
supports any type that implementsGetAsyncEnumerator
.But async iterator is tightly coupled
IAsyncEnumerable<T>
andManualResetValueTaskSourceCore
, that can not configure it.Also
Task
has task-like custom async method builder feature.My proposal is could you provides custom async iterator method builder?
For example:
For the real usage, I've already provides custom async enumerable type(
IUniTaskAsyncEnumerable
,IUniTaskAsyncEnumerator
) and async LINQ in my OSS Cysharp/UniTask.This is for the Unity Game Engine, and that custom Task(like ValueTask/IValueTaskSource) is tuned for the game engine.
Beta Was this translation helpful? Give feedback.
All reactions