Is os.File Write () streaming?

I was wondering if the Write () call in os.File is thread safe. I find it hard to find a mention of thread safety in documents.

+4
source share
2 answers

The convention (at least for the standard library) is this: no function / method is safe for simultaneous use unless explicitly specified (or obvious from the context).

You cannot record simultaneously os.Filethrough Write()without external synchronization.

+10
source

, , file.Write(). , , Go (Source).

, . , . WriteFile, .

0

All Articles