How to schedule Task on different thread priority?

2011/01/29

How to schedule Task on different thread priority?   .NET 4 brought as the Task Parallel Library (TPL) which is great improvement over the old threading techniques, both in terms of API and performance. the TPL APIs is elegant and clear, but intentionally the TPL team didn't add API (out of the box) for scheduling thread under different priorities.   this post deal discuss how to create custom TPL scheduler that schedule the work units under different thread priorities.  ...
no comments

Enum.HasFlag: good or bad?

2011/01/28

Enum.HasFlag: good or bad? .NET 4 give us nice elegant way of checking whether enums contain a value.   assuming that we have the following enum: Code Snippet public enum MyEnum {     None = 0,     A = 1,     B = 2,     C = 4,     D = 8 } we can use the bitwise for checking whether instantiation of the enum contain a value, as shown in the next snippet: Code Snippet var options = MyEnum.A | MyEnum.B;...
no comments

SDP (SELA annual conference) – Parallel Programming

SDP (SELA annual conference) - Parallel Programming SELA Group is having it's annual conference at 13-16 March 2011,   In the conference I’m going to have one-day tutorial (along with Yaniv Rodenski) about Parallel Programming. In this one-day tutorial you will cover how to gain real benefits from parallelizing your applications with .NET 4.0. We'll discuss parallel programming paradigms and concepts, APIs, concurrency profiling, parallel patterns and anti-patterns. Among the topics: implicit and explicit parallelism, synchronization, concurrent collections, partitioning, Reactive Extensions, and the future C# 5.0 parallelism.   If you happened...
no comments

How to find which core your thread is scheduled on?

How to find which core your thread is scheduled on? this post is short and quit simple, it deal with technique of finding out which core attached to the current thread.   in general finding the core is a matter of diagnostic, it may give some insights like whether we are using the CPU cache line in optimal way. the simplest way (and a very recommended one) is to profile your application using the Visual Studio Concurrent Profiler (which available on VS 2010 ultimate). in case that...
no comments