Fabien,
If you have the calculation on another thread, then it really doesn't
have to do with too many threads. The issue here is that your background
thread is probably taking up too many resources, to the point where the
whole machine is slowed down.
Is there a way you can break up the task into smaller chunks, and
dispose of any resources at the end of processing the chunk? For example,
if you are processing one million records in a table, maybe you can download
one thousand at a time, instead of the total one million (which would put a
strain on the system).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"d_well" <d_****@isuisse.com> wrote in message
news:96**************************@posting.google.c om...
Hi,
I am making a multithreaded application. I have a thread for the GUI
and another for a calcul. The thread for the calcul need a lot of CPU
and it is heavy. My problem is when I run the two threads, the thread
for the calcul disturbs a lot the GUI thread. I would like that my GUI
thread run fluently and my thread for the calcul be in background
without disturb the GUI thread. I tried to modify the priorities to
lowest for the calculation thread and highest for the GUI thread but
the problem is still the same. I tried too to put the parameter
isBackground to true for the calculation thread but doesn't work. How
can I manage my threads for that my calculation thread donesn't
disturb my GUI thread.
Thanks
Fabien