Problem using thread ??



Hello everybody,

I'm asking for help because i have problem with thread programming!

My application is runing under windows Ce 5. I use evc++ to make my
application.

In fact, my program is composed of 2 threads:
- One main thread which is the core of my application. Everythingh is done
in this thread. --> MAIN thread with priority NORMAL
-A thread which occurs every 10 ms. Every 10 ms, a timer interrupt occurs
and I control if a key is pressed. (if a key is pressed, i only validate a
flag and in the main thread, i do the action desired by this flag). -->
INTERRUPT thread with priority : 50 (high priority).

So you understand that the thread INTERRUPT wich occurs every 10 ms is very
important.

My problem is the following:
If in the main thread i have a boucle (a do...while for example) which used
a lot of CPU time (this thread has a normal priority).
At this time, I never go to the thread INTERRUPT whereas this thread has a
high priority !!! (sometimes i go in this thread 10 or 20 seconds later !!!)

I don't knwo why !! I just would like to have a periodic interrupt...


Thanks to help me please.

Fred


.