|
Doesn't really matter what you do with it. Simply search for thread synchronization in Java.
All you need to do is control the condition of the wait and notify so that when one thread is writing to the file it blocks all other threads from opening until its finished. When done, notify so that another thread can pick it up.
|