I am rather new to C# and trying to determine best practice when it comes to file operations.
My application is using Parallel.ForEach
to parse several large files. In the method, I am writing to a single file with StreamWriter
but having to lock the object during that process. I anticipated a slow down with that methodology and knew that I would have to have a separate thread for file IO.
Which brings me to my question. Does C# already provide a namespace for non-blocking, thread-safe file IO?
Thanks!