Hi,
It shouldn't be necessary in general, unless possibly if the two codes are actually in the process of a read at the same time.
I tested with a small code below and could not reproduce an issue, even when run 10+ instances of the program at the same time.
Possible reasons for your issue:
1] The file is open in another non SB program.
2] You are using ReadContents on a very large file and it is actively reading it.
Please share a small sample program that shows the issue and more details, like the size (number of lines etc) of the text file you are reading, how you are running multiple versions of your SB code etc.
i.e. Sufficient details for someone to have a good chance to reproduce the problem. If we can't reproduce an issue then we are guessing.
It shouldn't be necessary in general, unless possibly if the two codes are actually in the process of a read at the same time.
I tested with a small code below and could not reproduce an issue, even when run 10+ instances of the program at the same time.
Code:
fileName = Program.Directory+"\largefile.txt"
While ("True")
line = File.ReadLine(fileName,1)
TextWindow.WriteLine(line)
EndWhilePossible reasons for your issue:
1] The file is open in another non SB program.
2] You are using ReadContents on a very large file and it is actively reading it.
Please share a small sample program that shows the issue and more details, like the size (number of lines etc) of the text file you are reading, how you are running multiple versions of your SB code etc.
i.e. Sufficient details for someone to have a good chance to reproduce the problem. If we can't reproduce an issue then we are guessing.

