Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

concurrent file read problem!  RSS feed

 
LianGuang Wang
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi!
multiple threads can independently open a given file and will have separate instances of the java.io.File object, each corresponding to the same file.
in this case,do i need synchronize?i found it is right when multiple threads read by separate File object,what will happen when multiple threads write the same file?
who can tell me the mechanism of file manipulation in java?and show me the way how to deal with this situation!
thanks!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!