Access Violation (Global Resources)!!

V

Vai2000

Hi All, I have a process A which calls a worker thread. Process A can is
invoked by a launcher x no of times..
How do I ensure exclusive access to read/writes to my worker process? since
my worker process is doing a read and write to a shared resource.
Mutex is the way but how and where should I implement it. Putting a global
Mutex on the worker thread is not helping me.... and Launcher is a very
generic launcher....which just knows how to call an EXE can't do much of
coding there...

TIA
 
V

Vai2000

For write part

ReaderWriterLock rwl = new ReaderWriterLock();

rwl.AcquireWriterLock(Timeout.Infinite);

// do the JOB

rwl.ReleaseWriterLock();



Thanks for all your support
 

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

Top