Thrad problem
-
How many thread is alowed in app? I have found out that 25 is ok. I am using 6 and the system is using up 100% of processor. All the threads are suspended. I have debugged the app and there is no threads runnng. But when the last thread is suspended, the processor go up to 100%. I thougt that the last thread didn't sysspend, but i did. Iven if I remove the suspend command for the thread and just let it run one empty function. The processor is boosted to 100%
-
How many thread is alowed in app? I have found out that 25 is ok. I am using 6 and the system is using up 100% of processor. All the threads are suspended. I have debugged the app and there is no threads runnng. But when the last thread is suspended, the processor go up to 100%. I thougt that the last thread didn't sysspend, but i did. Iven if I remove the suspend command for the thread and just let it run one empty function. The processor is boosted to 100%
hg2705 wrote:
How many thread is alowed in app?
I don't know of any fixed limits, but in general, anything above 10 and performance starts to go down. Most of the time will be taken by context switches rather than any useful work.
hg2705 wrote:
Iven if I remove the suspend command for the thread and just let it run one empty function. The processor is boosted to 100%
Maybe some other process is running that's taking up the CPU? You can easily check that using TaskManager. Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
hg2705 wrote:
How many thread is alowed in app?
I don't know of any fixed limits, but in general, anything above 10 and performance starts to go down. Most of the time will be taken by context switches rather than any useful work.
hg2705 wrote:
Iven if I remove the suspend command for the thread and just let it run one empty function. The processor is boosted to 100%
Maybe some other process is running that's taking up the CPU? You can easily check that using TaskManager. Regards Senthil _____________________________ My Blog | My Articles | WinMacro
Thing is that i create a smal app that starts 10 threads, start them and suspend them at once. The processor is bosted to 100%. The maschine im using is an campaq notebook 600mz. 10 threds thar are suspended should not bee so har do handle...
public app() { mRun = true; mThreads = new ArrayList(); for(int i = 0; i<10; i++) { Thread t = new Thread(new ThreadStart(this.go)); t.Name = i.ToString(); t.Start(); t.Suspend(); mThreads.Add(t); } } private void go() { while(mRun) { listBox1.Items.Add("run"); Thread.Sleep(10000); } }
-- modified at 2:14 Friday 28th October, 2005 -
Thing is that i create a smal app that starts 10 threads, start them and suspend them at once. The processor is bosted to 100%. The maschine im using is an campaq notebook 600mz. 10 threds thar are suspended should not bee so har do handle...
public app() { mRun = true; mThreads = new ArrayList(); for(int i = 0; i<10; i++) { Thread t = new Thread(new ThreadStart(this.go)); t.Name = i.ToString(); t.Start(); t.Suspend(); mThreads.Add(t); } } private void go() { while(mRun) { listBox1.Items.Add("run"); Thread.Sleep(10000); } }
-- modified at 2:14 Friday 28th October, 2005Like I said, did you check if some other process is taking up processor time? Regards Senthil _____________________________ My Blog | My Articles | WinMacro