---
title: "Upcoming .NET User Forum Zurich / 6th July 2021"
description: "I am looking forward to give a talk about some insights and pitfalls of `async` / `await`.\n\nI will talk about the differences between asynchronous and parallel programming. Also a brief outlook how the state machine internally works. Feel free to join here: https://www.meetup.com/dotnet-zurich/events/278916769/\n"
updated: 2021-07-01
tags: ["NET User Group Zurich", "async", "C#", "await"]
canonical: "https://steven-giesel.com/blogPost/34bb68db-f846-409b-b144-05dd5e4eff54/upcoming-net-user-forum-zurich-6th-july-2021"
---

# Upcoming .NET User Forum Zurich / 6th July 2021

# Agenda
The talk will have the following topics:
 * Asynchronous Programming vs Parallel Programming
 * Deadlock and ConfigureAwait
 * State-Machine (very briefly and over-simplified)
 * Pitfalls & General Tips
 * ValueTask

And here a small teaser:

What do you think is wrong with the following code snippet?:
```csharp
var ids = new List<int>();
// ...
ids.ForEach(async id => await _myRepo.UpdateAsync(ids));
```

We could argue that everything will run smoothly, but the problem lies in the defintion of `List<T>.ForEach` itself:
```csharp
public void ForEach (Action<T> action);
```
See [MSDN List.ForEach](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1.foreach?view=net-5.0).

As `ForEach` accepts only `Action` and `Action` is not awaitable you can run into big trouble. This would be the same behaviour as `public async void`. 

## How can I join :shrug: 
As this is an online only event, feel free to join: https://www.meetup.com/dotnet-zurich/events/278916769/

All details you will find on the linked page above.