NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

are locks necessary around a single file write instruction?

Solved!
Go to solution

I am running 14 processes in parallel in TestStand, and each process will call a the "Write Text File" function occasionally.

 

Can one process's file write interrupt another one during mid-write, or do I need to put locks around each write?

 

0 Kudos
Message 1 of 3
(3,006 Views)
Solution
Accepted by bmihura

If you are accessing the same file then lock is required.And that too when you are writing to it.

Message 2 of 3
(2,988 Views)

OK, thanks. I'll arrange it so that different files are accessed per thread.

0 Kudos
Message 3 of 3
(2,983 Views)