Skip to content

Commit 830ebcf

Browse files
BillWagnergewarren
andcommitted
Update docs/standard/asynchronous-programming-patterns/async-lambda-pitfalls.md
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
1 parent f42ce8a commit 830ebcf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/standard/asynchronous-programming-patterns/async-lambda-pitfalls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Alternatively, project the items into tasks and use <xref:System.Threading.Tasks
4848
:::code language="csharp" source="./snippets/async-lambda-pitfalls/csharp/Program.cs" id="WhenAllAlternative":::
4949
:::code language="vb" source="./snippets/async-lambda-pitfalls/vb/Program.vb" id="WhenAllAlternative":::
5050

51-
<xref:System.Threading.Tasks.Parallel.ForEach*> accepts an `Action<T>` for its body parameter. Passing an async lambda creates an async void delegate`Parallel.ForEach` returns as soon as each delegate hits its first yielding `await`:
51+
<xref:System.Threading.Tasks.Parallel.ForEach*> accepts an `Action<T>` for its body parameter. Passing an async lambda creates an async void delegate. `Parallel.ForEach` returns as soon as each delegate hits its first yielding `await`:
5252

5353
:::code language="csharp" source="./snippets/async-lambda-pitfalls/csharp/Program.cs" id="ParallelForEachBug":::
5454
:::code language="vb" source="./snippets/async-lambda-pitfalls/vb/Program.vb" id="ParallelForEachBug":::

0 commit comments

Comments
 (0)