Synchronizing two different objects
Hi,
I have a problem in my program where I got two different object (from different classes) using the same resource.
One of the objects recreates a file every x seconds, while the second object is reading the file when it is called by the user.
When the file reading occurs during the file creation, I get an exception.
How do I use the Lock mechanizem (or any other option) to give this resourcse an exslusive access?
Thanks, Oren.