377 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.
Thread, lifecycle, foreground and background threads, the ThreadPool, worker and I/O completion threads, thread-local storage.
System.Threading.Thread: what it maps to, its cost, its API surface in .NET 10 and the narrow cases where a dedicated thread is the right choice.
ThreadState values, legal transitions, Join, Sleep, Interrupt and how a thread ends, including unhandled exceptions.
IsBackground, which threads are background by default, process exit rules and graceful shutdown in hosted apps.
Global and local queues, work stealing, minimum threads, hill climbing, starvation injection and the metrics to watch in .NET 10.
Worker versus completion-port threads, IOCP on Windows, epoll on Linux, how async I/O completes without a thread waiting, and what GetAvailableThreads really reports.
Per-thread state with ThreadStatic and ThreadLocal, why it breaks across await, and how AsyncLocal flows with ExecutionContext.