Forum Moderators: open

Message Too Old, No Replies

What is a Thread in asp.net

         

midi25

4:11 pm on Jan 22, 2004 (gmt 0)

10+ Year Member



Hi this may be a silly question but what is a Thread?

There is a Thread class in asp.net

I know that a Process is. Its a running application in memory.

But what is a thread.

Receptional

4:14 pm on Jan 22, 2004 (gmt 0)



A "Thread" to most WebmasterWorld readers is just the set of replies to an initial posting on the community. So - this is the second post in the "thread" you created when you asked the question....

Or did you mean something more technical?

bcolflesh

4:17 pm on Jan 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



developerfusion.com/show/4134/

korkus2000

4:20 pm on Jan 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>A process can create one or more threads to execute a portion of the program code associated with the process.

[msdn.microsoft.com...]

Receptional

4:31 pm on Jan 22, 2004 (gmt 0)



It's a good thing there are people in this community with real brains :)

Xoc

1:00 am on Jan 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Think of a thread as being similar to a separately running program, but with slightly less overhead. Things in two different threads can be working on two different things at the same time. For example, one thread might be polling the serial port, while another thread prints to the printer. Neither one will stop the other one from doing what it needs to do.

If you have two different threads, they must still share the same CPU, so they split up the time the CPU has between them. If your machine has two CPUs, then each thread can run on a separate CPU--the operating system automatically takes care of directing threads to the appropriate CPU in the most efficient manner.