Concurrent file write in Java on Windows

前端 未结 4 2133
谎友^
谎友^ 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条回答
  •  猫巷女王i
    2020-12-14 10:29

    If the 2 threads you are talking about are in the same JVM, then you could have a boolean variable somewhere that is accessed by both threads.

提交回复
热议问题