Hi,
An exception occurs randomly. I expect the value of ^TEST to be 20, but it's not. Did i miss something like closing, flush the stream or locking the global?
Exception
Testcode
test
n glob s glob=$na(^TEST) k @glob
n file s file="C:/temp/file.xslt"
n i f i=1:1:20 w !,$$save(file,glob)
q
save(file,glob) {
s fs=##class(%Stream.FileBinary).%New()
s sc=fs.LinkToFile(file)
q:$System.Status.IsError(sc) sc
s gs=##class(%Stream.GlobalBinary).%New(glob)
s sc=gs.CopyFromAndSave(fs)
q:$System.Status.IsError(sc) sc
q gs.%Id()
}

.png)
.png)

