Is an asynchronous IO file similar to FileStream.BeginWrite thread safe? If not, then you need to wrap "SyncLock", which means that it still blocks the stream.
FileStream.BeginWritealready starts a new thread to access files. You do not need to run FileStream.BeginWritein a separate thread (because it will be a thread in a thread). On the other hand, several functions FileStream.BeginWriteshould not access the same file at the same time.
FileStream.BeginWrite
In addition, if a resource accesses multiple threads, this means that it is a shared resource, and there are many resources about their use in C #.
FileStream.BeginRead/BeginWrite , - - .
, BeginRead/BeginWrite / , (, Seek) , / .
, Microsoft FileStream " ". BeginReadCore BeginWriteCore.
: -, , P/Invoke ReadFile/WriteFile.