If I open a same file(.txt file) a few times in different threads, the file descriptor returned would be different. If I tried to write() using the file descriptor, any chance of the write function be blocked since when the multiple threads trying to write to the same file?
My concern is when a thread call write to a single file, when the other thread call to write to the same file as well. So will the write of the second thread wait for the write of the first thread to finish first? If it is the case, how do I ensure that the second call to write would not wait and would return immediately if there is a first write as I don't want the write of second thread to wait.
Thanks