EngineeringSenior DeveloperInterview Sessions

Interview Answers - Phase 1: .NET Core & C# Mastery

Premium

Các câu trả lời dưới đây mang tính chất minh họa mindset của một Master/Architect: không chỉ đọc thuộc tài liệu mà còn hiểu trade-off và ứng dụng thực tiễn.


1. Async/Await & Concurrency

Câu 1: Tại sao gọi Task.Run trong ASP.NET là bad practice?

  • Trả lời: ASP.NET Core không có khái niệm "request thread" chuyên biệt. Mọi request đều được map vào một thread thuộc Thread Pool ngay từ đầu. Gọi Task.Run() trong controller chỉ để offload việc nặng sang một thread khác cũng lấy từ cùng Thread Pool đó.
Premium

Continue with premium access

Interview Answers - Phase 1: .NET Core & C# Mastery is part of the premium library. Sign in with a premium account to unlock the full lesson and the rest of this track.

01 Full premium lesson access
02 Deeper implementation notes
03 Ongoing content updates