While writing on a file from some QThread and another thread try to write on the same file, The code will crash.
I need to lock the file until my thread finish writing on it. Then unlock it.
I mean by "lock" : prevent other threads from writing on this file until this thread finish writing on it.
May you help me.
Regards,
What you are looking for is called a "mutex". I could point to it in the documents but what you really want to do is do a web search and read more about programming in threads both generically and with the specific API provided by Qt.
Bookmarks