Gustav
Gustav
CC#
Created by Gustav on 3/17/2025 in #help
.Net framework async controllers
Hi, I need some help in understanding the pitfalls of async in .net framework. Background We have an old .mvc net framework application, we are in the process of migrating from mvc to a pure rest api. While doing so we are considering introducing mediator (the MediatR package). This has an async nature while the rest of our codebase is entirely sync. Are there any dangers of things like thread starvation by introducing this? Are there other pitfalls/dangers I should be vary of? Example callstack before 1. Sync controller 2. Sync mediator (ish) 3. Synd db query Example callstack after 1. Async controller 2. Async mediator 3. Sync db query
9 replies