3 ms·
Never, ever, ever do this in production. This will block at least two threads, which will cause premature thread pool starvation at spike loads. This pattern,
by ddek 6y ago
Never, ever, ever do this in production. This will block at least two threads, which will cause premature thread pool starvation at spike loads.
This pattern, 'sync-over-async', is to be avoided at all costs, at all times.
You're not going to like it, but the MS recommended way of dealing with this is to make your callstack async.
In all honest - if you're making an ASP net core web app, go all in on async from the start. If you have to mix and match, never go sync-over-async inside an action.