Task-Based Asynchronous Pattern (TAP)
April 29, 2020
Returns Task or Task<TResult> Use Async suffix in methods Overloaded to accept cancelation token
Tips & Thoughts
April 29, 2020
Returns Task or Task<TResult> Use Async suffix in methods Overloaded to accept cancelation token
April 29, 2020
PLINQ, or Parallel LINQ when is deduced to automate parallelization. As you might have already guessed that it is parallelization using the same linq queries that we are used to. Except is all we do is say dot as parallel and then that query could run AsParallel query. If we were to execute a certain operation in parallel, we would need to partition the work into tasks, execute those tasks on multiple different threads, and then combine the results. The good…
April 29, 2020
The task parallel library (TPL) is a set of public types and APIs.The vision behind the TPL is for the developers to be able to maximize the performance of code while not having to worry about the nitty gritties of threading. TPL makes us productive by Simplifying the process of adding parallelism and concurrency to applications. Scaling the degree of concurrency dynamically. Handling partitioning of the work . Scheduling threads…
April 28, 2020
.NET Framework built-in static methods are thread safe.When creating static methods, it is a best practice to make them thread safe. Thread Affinity Thread that instantiate an object is the only thread that is allowed to access its members. (Like WPF UI thread)One of the advantages of having thread affinity is that we may not need to use a lock to use instantiated object, since no other thread can access…