In the last article we talked about what are Job Queues in C#. We saw several great implementation using BlockingCollection and the thread-pool. In part 2, we'll see a couple of great ones including...
One of the most powerful tools in programming is the Job Queue. It's a simple concept that stands in the core of many software solutions. It's also a pretty interesting programming challenge, especially in a versatile language like C#.
Welcome to the 3rd and final part of the Deadlocks-in-Depth series. In this part, I’ll show you 2 additional techniques to debug deadlocks: Working with Tracepoints and using the notorious WinDbg to automatically detect deadlocks.
We'll see two more deadlock types: The notorious UI-Message-Queue Deadlock and the Sync-Context Deadlock (both names coined by me just now). In addition, I'll show you a new debugging technique for deadlocks and multi-threaded scenarios.
For me, multi-threading programming is one of the most fun things I do as a developer. It’s fun because it’s hard and challenging. And I get a particular sense satisfaction when solving deadlocks. So today I’m writing on one of my favorite subjects.
Recently I was dealing with a couple of bugs in C# regarding timeout behavior. The solutions were pretty interesting so I decided to share them. Consider these scenarios: We show a dialog to the user with some message. We close the dialog after 15 seconds. However, if the user closes the dialog manually, we have no need to close it at timeout. Start a long operation. If that operation lasts more than 5 seconds – Abort it.