Atomic file write operations (cross platform)

后端 未结 7 1788
礼貌的吻别
礼貌的吻别 2020-12-28 15:34

How do I build up an atomic file write operation? The file is to be written by a Java service and read by python scripts.
For the record, reads are far greater than writ

7条回答
  •  天涯浪人
    2020-12-28 15:59

    Have the python scripts request permission from the service. While the service is writing it would place a lock on the file. If the lock exists, the service would reject the python request.

提交回复
热议问题