File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
tests/FSharp.Test.Utilities Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -108,12 +108,12 @@ module Utilities =
108108 let outputLines = StringBuilder()
109109 let errorLines = StringBuilder()
110110
111- do redirector.OutputProduced.Add ( fun line -> outputLines.AppendLine line |> ignore)
112- do redirector.ErrorProduced.Add( fun line -> errorLines.AppendLine line |> ignore)
111+ do redirector.OutputProduced.Add ( fun line -> lock outputLines <| fun () -> outputLines.AppendLine line |> ignore)
112+ do redirector.ErrorProduced.Add( fun line -> lock errorLines <| fun () -> errorLines.AppendLine line |> ignore)
113113
114- member _.Output () = outputLines.ToString()
114+ member _.Output () = lock outputLines outputLines .ToString
115115
116- member _.ErrorOutput () = errorLines.ToString()
116+ member _.ErrorOutput () = lock errorLines errorLines .ToString
117117
118118 interface IDisposable with
119119 member _.Dispose () = ( redirector :> IDisposable) .Dispose()
You can’t perform that action at this time.
0 commit comments