What is the simplest (best?) way to create a file lock? I have a few
machines trying to access a common file that contains work to do
(computer farm). Each computer needs exclusive access to this network
file to see what work is available. Currently, each machine trys to
rename the file, modifies it, and then renames it back to the original.
This works maybe 99% of the time, but sometimes 2 machines seem to get
their own copy of the work file and I get 2 versions of the work file
floating around.
The machines are running Windows XP and 2000, and have a common network
share.
machines trying to access a common file that contains work to do
(computer farm). Each computer needs exclusive access to this network
file to see what work is available. Currently, each machine trys to
rename the file, modifies it, and then renames it back to the original.
This works maybe 99% of the time, but sometimes 2 machines seem to get
their own copy of the work file and I get 2 versions of the work file
floating around.
The machines are running Windows XP and 2000, and have a common network
share.