Therefore, after each reading CFile object need to empty has not read the data read some data without affecting the continue to write,
CodePudding user response:
This looks like the Pipe (Pipe) compared with demandMultithreaded Pipe Server
CodePudding user response:
Need a read-write lock, etc. To be maintained or write multiple files, read the thread finished reading, just delete this file, and then use a set of file name cycleCodePudding user response:
The best is not divided into two threads, should be run in one thread,Another suggestion: had better not use CFile object to do this, or use memory to direct exchange is ok
CodePudding user response:
Read the complete can't delete file "? When written in sh create again?CodePudding user response:
Thread synchronization problem, check on the method of thread synchronization,Your description and look like is to do a file buffer, so why set up a section of memory as a buffer? CFile why want to use?