|
| ||||||||||
| Tags: c sharp, c sharpnet, clr, net, vbnet |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Threading in c# .net
|
|
#2
| ||||
| ||||
| Re: Threading in c# .net
Yes! I have a solution for keeping number of processes in background in running state. C# supports parallel execution of code through multithreading. When any process starts on a system it is treated as parent thread or primary thread. This primary thread process may run along with no. of child threads during working. A thread is an independent execution path, able to run simultaneously with other threads. A C# client program starts in single thread created automatically by CLR. CLR assigns each thread its own memory stack so that local variables are kept separate. So it is possible to keep number of processes simultaneously by assigning each process to new individual thread. |
|
#3
| |||
| |||
| Re: Threading in c# .net
Windows also follow the concept of threading to provide us the facility of multitasking. For using multitasking in your project you just need to add two namespaces in your solution which provides all the keywords and methods which you required to perform threading in your application. The namespaces that you need to add in your solutions are:-
|
|
#4
| |||
| |||
| Re: Threading in c# .net
After starting the thread its "IsAlive" property returns true until the point where the thread ends. A thread ends when the delegate passed to the Thread’s constructor finishes executing. Once ended, a thread cannot start. But yes you can keep it as pending using Thread class sleep property. If more than one thread is working on a common or shared object than you have to use proper locking mechanism to avoid accident between two working threads. You can use conditional statements to check locking. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Threading in c# .net" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is Hyper threading | Ameeryan | Overclocking & Computer Modification | 2 | 06-10-2009 04:03 PM |
| What is Threading in C# Programming ? | HAKAN | Software Development | 2 | 31-03-2009 11:18 AM |
| What is threading in JAVA? | Arsenio | Software Development | 3 | 02-03-2009 07:29 PM |
| VB.NET threading question | AmolP | Software Development | 3 | 14-02-2009 05:03 PM |
| Threading Unleashed | Cool_Rahul | Software Development | 0 | 19-12-2008 12:39 PM |