You Should Probably Be Using IAsyncEnumerable

When
Thursday September 17th, 2026 @ 5:30 PM
Who
Aaron Stannard
Where
Beach Walk Coworking

RSVP

A job has been running for twenty minutes. Is it working, or is it dead?

You can’t tell. Not from the outside.

Task<T> has three states: pending, completed, faulted. “Alive and making progress” and “stuck forever and never coming back” are the same one. That isn’t an observability gap you can instrument your way out of. It’s how Task is designed.

What we need is a better primitive for modeling longer running background jobs, intermittent jobs, and producer-consumer relationships. Enter IAsyncEnumerable, which allows us to model these tasks as asynchronous streaming jobs.

IAsyncEnumerable<T> isn’t a sequence you await. It’s a producer / consumer contract - you know it’s alive when new events arrive during the progression of the job, rather than at its completion.

In this talk we’ll look at several examples of .NET code where IAsyncEnumerable is crucial to ensure the success of the application:

  • AI agent that runs two timers over its own token stream, so it can distinguish “nothing arrived, it’s dead” scenarios from “heartbeats arriving, zero real output, it’s alive and stuck.”
  • A 20-minute re-embedding job that streams progress over ASP.NET Core SSE, where a late subscriber’s first element is the current state.
  • And an e-commerce checkout page that used to poll for proof of fulfillment / payment activity, that now instead waits for events via SSE to drive navigation and behavior from the back-end.

You’ll learn how and where to apply IAsyncEnumerable to solve your problems.

Food / Drinks

Food and drinks will be provided! Please contact us (on meetup) if you have any dietary restrictions/food allergies.

Directions and Parking Instructions

Meeting will be held at Beach Walk Coworking, 96 Beach Walk Blvd, Conroe, TX 77304 in the ground floor meeting room. Free parking is available on site.

Aaron Stannard

Hi! I’m Aaron Stannard, and I’m the CEO and founder of Petabridge, where I’m making Akka.NET to help the world’s most important companies build amazing applications with .NET.

I’ve been working on Akka.NET for over 10 years and I haven’t gotten tired of it yet!

Prior to Petabridge I founded MarkedUp Analytics, a real-time in-app marketing and analytics service used by 1000+ developers. Prior to that I worked at Microsoft as a Startup Developer Evangelist.

Last Updated: February 1st, 2023