In my application, I have 2 threads plus a main thread.
One stream is receiving data (4096 bytes into the buffer) from the I / O module when an interrupt occurs. And another thread should consume this data (process and format and write data to a file).
What would be the best way to achieve this?
I can’t lose data from the manufacturer’s stream, which happens at a high speed.
Any examples that I can study on this will be greatly appreciated.
I am trying to implement threads with thread safety and with difficulty.
I'm sorry that I forgot to include the platform and other information. I am using Windows XP (32 bit) and Microsoft Visual Studio 5.0 compiler.
source share