Monitors & Deadlocks
Monitors & Deadlocks

Monitors In my previous post we spoke about locks and resource synchronization. A Monitor also provides a similar set of actions to a lock, but the syntactic sugar slightly differs from locks. They allow a program to ensure only one thread at a time can access a particular object. Rather than controlling a statement or... » read more

Locks
Locks

Manage Multithreading In a multi-threading program, the order in which the actions were performed was different each time. This is because operating system decides when a thread runs, and the decisions are made based on the workload. When asynchronous solutions are designed with multi-threading one should consider the uncertainty about the timings of thread activity... » read more

Async/Await
Async/Await

Consider the following example where the method Compute Averages is going to calculate the average of random numbers generated over the given number. If the method is called with a very large number (100000000), the random number generator takes time to generate the numbers over a very large number of operations and on top of... » read more

NDepend
NDepend

Background A month ago, Patrick Smacchia a C# MVP and the author of Ndepend reached out to me to have a look at his product: NDepend and asked me to share my thoughts on it. I must say I felt very happy when Patrick contacted me to let me try this and also giving me the honor... » read more

Threads
Threads

In this post I am going to talk about Threads in C# and different methods to interact with them. Threads are lower level of abstraction than tasks. A task object represents an item of work to be performed where as thread object represents a process running within an operating system. Threads and Tasks Creation of... » read more

Tasks
Tasks

In this post I am going to talk about creating a task and various method of task library which interacts with task execution in C# Create a task Creating a task is done by providing the method of work to the lambda expression. Start method starts the task and wait method waits for the task... » read more