Category: Tutorial

Dec 11

Threading in C# Part -5

Threading in C# Part -5 This is in the continuation of previous four Posts: Threading in C# Part -1 Threading in C# Part -2 Threading in C# Part -3 Threading in C# Part -4 Thread Pooling Whenever you start a thread, a few hundred microseconds are spent organizing such things as a fresh private local …

Continue reading

Permanent link to this article: http://zappmania.in/2013/12/11/threading-c-part-5.htm

Dec 11

Threading in C# Part -4

Threading in C# Part -4 This is in the continuation of previous three Posts: Threading in C# Part -1 Threading in C# Part -2 Threading in C# Part -3 Thread Priority A thread’s Priority property determines how much execution time it gets relative to other active threads in the operating system, on the following scale: …

Continue reading

Permanent link to this article: http://zappmania.in/2013/12/11/threading-c-part-4.htm

Dec 10

Threading in C# Part -3

Threading in C# Part -3 Creating and Starting Threads As we saw in previous Posts Threading in C# Part -1, Threading in C# Part -2, threads are created using the Thread class’s constructor, passing in a ThreadStart delegate which indicates where execution should begin. Here’s how the ThreadStart delegate is defined:

Calling Start on …

Continue reading

Permanent link to this article: http://zappmania.in/2013/12/10/threading-c-part-3.htm

Dec 10

Threading in C# Part -2

Threading in C# Part -2 How Threading Works Multithreading is managed internally by a thread scheduler, a function the CLR typically delegates to the operating system. A thread scheduler ensures all active threads are allocated appropriate execution time, and that threads that are waiting or blocked (for instance, on an exclusive lock or on user …

Continue reading

Permanent link to this article: http://zappmania.in/2013/12/10/threading-c-part-2.htm

Dec 10

Threading in C# Part -1

Threading in C# Part -1 Introduction and Concepts C# supports parallel execution of code through multithreading. A thread is an independent execution path, able to run simultaneously with other threads. A C# client program (Console, WPF, or Windows Forms) starts in a single thread created automatically by the CLR and operating system (the “main” thread), …

Continue reading

Permanent link to this article: http://zappmania.in/2013/12/10/threading-c-part-1.htm