Question: Am newbie to thread concept. I have little confusion over thread.

What is the difference between normally calling the method and calling the method using threading. What is the use of thread.join?

Example:
In the code behind file: normally calling the method

```
Getdata();

```

By using thread am calling this methd:

```
Thread th=new Thread(new ThreadStart(Getdata));

th.Start();

```

Which one yields high performance

Answer: 
Lets boil this down to a simple case. You have a dual core processor in your computer. Lets say each core can only process one thread at a time (in reality, they can switch between many, very quickly). 

In order to run two pieces of code at once, you would need 2 threads. If you simply appended the code from the 2nd thread to the end of the first, the 2nd thread would have to wait for the 1st thread's code to complete. Thread 1 is said to be *blocking*. Thread 2 is said to be *waiting*.

Threads have great application. Consider games, where the rendering of the scene is performed in a loop. Any heavy processing between each frame will cause the frame-rate to slow down. You want to avoid this. What do you do? You do your heavy processing on another thread and trust that the operating system will make the best use of the available CPU cores.
The purpose of threading is to fulfill the need to run separate code in the same time. In general, if you have a source-code, all the lines in your source-code will be executed sequentially. Let's consider the case when you are sending an email to 20 receipients. If you send all the mails one after the other, then the total waiting time is the total time while your emails are delivered. If you create 20 threads, one for each email sending, then your waiting time will be roughly the time of your slowest mail, that's approximately 20x speedup. Also, let's consider you are playing a chess game against the computer. The engine has to constantly think about the best possible variation, but in the meantime its time is decreasing and it must be displayed graphically, also, sometimes sound effects should be displayed and so on.