Multiple threads writing on same file

前端 未结 4 697
说谎
说谎 2020-12-21 10:41

I would like to know if we can use multiple threads to write binary data on the same file.

FILE *fd = openfile(\"test\");
int SIZE = 1000000000;
int * table          


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-21 11:20

    fseek and fwrite are thread-safe so you can use them without additional synchronization.

提交回复
热议问题