I have a CFile object, which can be accessed by multiple threads. There is the possibility that one thread is writing data to this file while another thread is reading data from the file. I want to know is there any unsafety under this policy? Can the file pointer change before the write or read process complete? Is the answer is yes, how to avoid the unsafety of multi-thread which can be reading or writing at the same time?
Thank you very much!