J
Joris Dobbelsteen
I have a very strange situation here:
I have an console application that reads from a the COM port. I have 1
thread busy doing this.
Next I have 512 threads which perform a write/read cycle on the COM port
with some restrictions:
For every command (there are 254) there can be only one doing the
write/read, the rest is queued up in order (tnx Nicholas).
Next there is a restrictions only 16 (currently) can be doing the write/read
similtanous (using WaitAny on 16 AutoResetEvents).
Now when the application HAS the focus it does it job nicely.
When the focus is moved to another application it stops doing anything (my
scope on the RS232 data channels also stops displaying anything). Sometimes
before the stop its working very rapidly.
Moving the focus back to the applicaiton continues.
Now why is that?
- Joris
I have an console application that reads from a the COM port. I have 1
thread busy doing this.
Next I have 512 threads which perform a write/read cycle on the COM port
with some restrictions:
For every command (there are 254) there can be only one doing the
write/read, the rest is queued up in order (tnx Nicholas).
Next there is a restrictions only 16 (currently) can be doing the write/read
similtanous (using WaitAny on 16 AutoResetEvents).
Now when the application HAS the focus it does it job nicely.
When the focus is moved to another application it stops doing anything (my
scope on the RS232 data channels also stops displaying anything). Sometimes
before the stop its working very rapidly.
Moving the focus back to the applicaiton continues.
Now why is that?
- Joris