Process Synchronization in java -


Process A writes in XYZ, when executed. Processes are B and C, when executed, the file reads XYZ. Therefore, while the process A is above, B and C should wait to complete. Can I use the java.nio package to provide synchronization? Or should I use something like file lock or socket? Can we tell the time to wait for another process to wait?

Edited: The file is created during the first writing process. In such a case, can I make it a shared resource?

Java Eno package can use file lock better solution, I hope but, I think java.nio is not complete up to JDK 1.6.

File lock:

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -