Thread Priority



Hi,

I am running a thread to monitor the state of an I/O line on a NI PCI 6503
Digital I/O board.
The thread reads the port continuously and waits for a change on the line.
When detected, it fires off a message to the app. message queue to start a
measurement.
It all works fine, except that the thread consumes all the CPU cycles on one
core when nothing else is happening ! Maybe I shouldn't worry, but on a
laptop that causes the CPU to max out and waste power. I could lower the
thread priority - not sure what that would do. In truth, I probably only
need to read the port 20 times per second. Any suggestions ? Would a timer
be better ?

Thanks for reading !

Kevin




.