This is a discussion on Describe the difference between a Thread and a Process? within the ASP and ASP.NET Programming forums, part of the Web Development category; Describe the difference between a Thread and a Process?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Describe the difference between a Thread and a Process? |
|
#2
| |||
| |||
| THREAD: Thread is used to execute more than one program at a time. Difference:
Process executes the single program Difference:
|
|
#3
| |||
| |||
| Hi, I came to know about multithread concept in java and has two types to create it.. Can u give idea about multithread... Thanks in Advance
__________________ Krishnakumar.S Beware of Everything -that is un true; stick to the Truth shall succeed slowly but steadily |
|
#4
| |||
| |||
| hey, Multithreaded applications provide the illusion that numerous activities are happening at more or less the same time. In C# the System. Threading namespace provides a number of types that enable multithreaded programming. Whenever an application runs, it runs under a main thread. However, running a single thread can sometimes lead to unnecessary performance and locking issues. So if the application can be broken into multiple threads without hampering the flow of the main thread, then using it is always better. n .NET, the threading is handled through the System.Threading namespace. Creating a variable of the System.Threading.Thread type allows you to create a new thread to start working with. It is clear to everybody that the concept of threading is to go off and do another task. The Thread constructor requires the address of the procedure that will do the work for the thread. The AddressOf is the parameter that the constructor needs to begin using the thread. Below is an example of a simple threading application. Listing 1 Imports System.Threading Public Class Form1 Inherits System.Windows.Forms.Form Dim th1 As Thread Dim th2 As Thread Private Sub Form1_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load th1 = New Thread(AddressOf proc1) th2 = New Thread(AddressOf proc2) th1.Start() th2.Start() End Sub Sub proc1() Dim iCount As Integer For iCount = 1 To 10 cmb1.Items.Add(iCount) Next End Sub Sub proc2() Dim iCount As Integer For iCount = 11 To 20 cmb2.Items.Add(iCount) Next End Sub End Class
__________________ Venkat knowledge is Power |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to wait a program control until a thread completes it process? | $enthil | C# Programming | 4 | 11-16-2007 03:08 AM |
| Process & Thread | Sathish Kumar | C# Programming | 4 | 08-22-2007 04:47 AM |
| How to get a reference to primary thread from process ? | theone | Mobile Software Development | 1 | 07-30-2007 03:50 AM |
| Describe the difference between a Thread and a Process? | kingmaker | C# Programming | 1 | 07-30-2007 12:21 AM |
| What is daemon thread and How to create the daemon thread Java? | bluesky | Java Programming | 1 | 07-25-2007 05:55 AM |
Our Partners |