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