1
When and why should we use threads? I’d like a few examples.
1
When and why should we use threads? I’d like a few examples.
4
Keep in mind that every program already has at least one thread, which is the thread main (where it is running). There are a thousand and one reasons to use thread, and each programmer should know the best occasion, but I could list some:
1
In practice when I use Threads:
In windows Forms, there is practically no way not to use Multi-thread, because any more time consuming operation hangs the Main Thread, and to access the objects of another Thread, we q use delegates and the invoke method of the Controls!
A good example I used Threads was in the import of data between different databases, where we would deploy a new system in a new company and the company had a legacy system, without using a multi-thread system the import would last about 24 hours, using Thread this time dropped considerably to 35 minutes!
0
We should use threads every time we need to do two tasks at once...
If you have the need to water two Lists first you load and then one and then load the other. With thread you can load them at the same time.
Browser other questions tagged c# thread
You are not signed in. Login or sign up in order to post.
You have a few questions that may help: http://answall.com/q/123173/101, http://answall.com/q/131108/101, http://answall.com/q/1946/101, http://answall.com/q/14904/101 and http://answall.com/q/95233/101 One of them should, or the whole answer that.
– Maniero