hi,

I want to know what a thread is and what it is used for. also how it is used...:mrgreen:

thanks

Recommended Answers

All 2 Replies

Think of doing two things at once. You could consider that using two threads. Threads make multitasking more efficent and possible.

Think of what would happen if you had the following:

while(true)
{
    //do something
}

That'd loop forever and the program would never get to the rest of your code. If that while loop was run in a Thread, it'd continue to loop forever, but your other code would execute as well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.