Forum Discussion
Oscar
3 years agoContributor
I am getting the same error when trying to write to a file ... I think it's due to multithreading
Dim oFile As StreamWriter = New StreamWriter(BRAPi.Utilities.GetFileShareFolder(si, FileShareFolderTypes.ApplicationIncoming, Nothing).Replace("\Incoming","\Groups\Everyone\test1.txt"),True)
oFile.WriteLine( api.Pov.Time.Name & " | " & api.Pov.Entity.Name & " | " & dataBuffSource.DataBufferCells.Count & " | " & elapsedTime )
oFile.Close
ChristianW
3 years agoValued Contributor
Probably. There are asynchronous versions of Write and WriteLine: WriteAsync and WriteLineAsync. But didn‘t tried it yet, so I don‘t know details.
Related Content
- 2 years ago
- 2 years ago