I am currently in the process of building a new application.
For the first time, I'm making extensive use of multithreading.
What I find is when I run the following subroutines without multithreading:
Sub1
Sub2
Sub3
...all sequentially (on my dual core cpu computer), the program itself grinds to a halt and becomes completely unresponsive, until the 3 subroutines have all completed their work.
However, when I assign those same 3 subroutines to 3 separate threads and then run those threads simultaneously, the program is responsive and if I hadnt programmed the application myself, I would never know that the program is actually "working" hard, in the background. The finish time of the subroutines is also faster.
Now, I am using a Core2Duo. So, when running a multithreaded program, it is logical to expect the program to run faster, compared to if an identical program is run, which is not equipped to deal with multithreading. In fact, this is what I have found above.
Q1. Would running a multithreaded program, on an older cpu, which has no HyperThreading and only a single logical cpu, allow the program to be run without making it completely unresponsive (which proved to be the case when using a multi core cpu), until the 3 subroutines have completed their work.
Q2. Would using a multi threaded application on a computer with a single logical cpu be a problem?
I ask this because I want the program to be run on older computers, PDAs and smartphones, which won't have multi core cpus.
For the first time, I'm making extensive use of multithreading.
What I find is when I run the following subroutines without multithreading:
Sub1
Sub2
Sub3
...all sequentially (on my dual core cpu computer), the program itself grinds to a halt and becomes completely unresponsive, until the 3 subroutines have all completed their work.
However, when I assign those same 3 subroutines to 3 separate threads and then run those threads simultaneously, the program is responsive and if I hadnt programmed the application myself, I would never know that the program is actually "working" hard, in the background. The finish time of the subroutines is also faster.
Now, I am using a Core2Duo. So, when running a multithreaded program, it is logical to expect the program to run faster, compared to if an identical program is run, which is not equipped to deal with multithreading. In fact, this is what I have found above.
Q1. Would running a multithreaded program, on an older cpu, which has no HyperThreading and only a single logical cpu, allow the program to be run without making it completely unresponsive (which proved to be the case when using a multi core cpu), until the 3 subroutines have completed their work.
Q2. Would using a multi threaded application on a computer with a single logical cpu be a problem?
I ask this because I want the program to be run on older computers, PDAs and smartphones, which won't have multi core cpus.
Last edited: