Yes. It's ok to have many threads updating many different files. You just need a simple check to handle those cases where two threads happen to want to update the same file. That's where a sync block with the file as the lock object comes in - forcing one thread to wait until the other thread has finished updating and releases the lock.
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Mr.M 58 Future Programmers
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Mr.M 58 Future Programmers
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Mr.M 58 Future Programmers
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Mr.M 58 Future Programmers
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Mr.M 58 Future Programmers
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Mr.M 58 Future Programmers
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.