IAsyncEnumerable without Await #4062
Answered
by
jcouv
TonyValenti
asked this question in
Q&A
-
What is the right way to implement an IAsyncEnumerable that doesn't actually await anything so that you don't get any warnings? |
Beta Was this translation helpful? Give feedback.
Answered by
jcouv
Oct 23, 2020
Replies: 3 comments 9 replies
-
can you provide more details (including code)? I don't know what warnings you're referring to. |
Beta Was this translation helpful? Give feedback.
6 replies
-
Options I can think of:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jcouv
-
You can add |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Options I can think of:
await Task.CompletedTask;
in your codeIAsyncEnumerable
andIAsyncEnumerator
, which would wrap around anIEnumerator
), which is a bit tedious