Concurrent file write in Java on Windows

前端 未结 4 2134
谎友^
谎友^ 2020-12-14 09:59

What happens when you concurrently open two (or more) FileOutputStreams on the same file?

The Java API says this:

Some platforms, in particula

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-14 10:06

    Unix allows concurrent writers to the same file.

    You shouldn't be attempting to write to the same file more than once. If you are you have a design flaw.

提交回复
热议问题