Record locking in C#

  • Thread starter Thread starter Adrian
  • Start date Start date
Hi,

Depending of what you want to lock you use one or other mechanism, for a
file could be as simple as open it as exclusive.

Don't know what kind of records you mean.

You can use Mutex to generate a lock in the local machine, but if your app
is used in more than one machine it does not work.
 
Thanks.
So there is no simple locking / unlocking of files.

Supposing file B is being used by several users;
a file A is created when file B is opened.
If another user wants to use file B, when file
A exists, he will be kept waiting in a loop
until file A is deleted when the other user
exits file B.

Is this a feasible solution?

Adrian.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top