Tag: Thread

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

Nov 21

How can you avoid deadlock in threading?

A good and careful planning can avoid deadlocks.There so many ways microsoft has provided by which you can reduce deadlocks example Monitor ,Interlocked classes , Wait handles, Event raising from one thread to other thread , ThreadState property which you can poll and act accordingly etc.

Permanent link to this article: http://zappmania.in/2012/11/21/how-can-you-avoid-deadlock-in-threading.htm

Nov 20

ManualResetEvent and AutoResetEvent

Threads that call one of the wait methods of a synchronization event must wait until another thread signals the event by calling the Set method. There are two synchronization event classes. Threads set the status of ManualResetEvent instances to signaled using the Set method. Threads set the status of ManualResetEvent instances to nonsignaled using the Reset method or when …

Continue reading

Permanent link to this article: http://zappmania.in/2012/11/20/manualresetevent-and-autoresetevent.htm

Nov 20

What are wait handles/mutex object ?

Wait handles sends signals of a thread status from one thread to other thread.There are three kind of wait modes :- WaitOne. WaitAny. WaitAll. When a thread wants to release a Wait handle it can call Set method.You can use Mutex (mutually exclusive) objects to avail for the following modes. Mutex objects are synchronization objects …

Continue reading

Permanent link to this article: http://zappmania.in/2012/11/20/what-are-wait-handlesmutex-object.htm

Nov 20

Multi-tasking, Thread, and Multi-threading

Multi-tasking : Its a feature of modern operating systems with which we can run multiple programs at same time example Word,Excel, notepad etc. Thread : A thread is the basic unit to which the operating system allocates processor time. Multi-threading : it forms subset of Multi-tasking instead of having to switch between programs this feature switches between different parts …

Continue reading

Permanent link to this article: http://zappmania.in/2012/11/20/multi-tasking-thread-and-multi-threading.htm