C# async/await: quand utiliser ConfigureAwait(false) ?

asked 24 days ago34 viewsfr

2

Dans une bibliothèque .NET, on me dit de toujours mettre ConfigureAwait(false). Est-ce encore nécessaire avec .NET moderne (pas d'ASP.NET SynchronizationContext) ?

🤖 AI diagnosis

AI-generated. Not an answer — the community below confirms or corrects it. Always verify before relying on it.

asked 24 days ago

3 Answers

6

Query sys.dm_db_index_usage_stats for reads vs writes since last restart. Indexes with high user_updates and zero user_seeks/scans are candidates for removal. Add the missing index only if the query is frequent and selective.

Sign in to tell others whether this worked.

answered 24 days ago
5

CrashLoopBackOff almost always means the container's main process exits. Check kubectl logs --previous. Common causes: readiness probe on a port the app binds late, missing env/secret, or the app needing a writable volume it doesn't have.

Sign in to tell others whether this worked.

answered 24 days ago
4

In modern .NET (no SynchronizationContext in ASP.NET Core, console, or worker apps) ConfigureAwait(false) is a micro-optimization. In libraries that might run under WPF/WinForms/legacy ASP.NET, keep it. It never hurts.

Sign in to tell others whether this worked.

answered 24 days ago

Sign in and verify your email to post an answer.