I have a multi-threaded application which does a lot of file accessing. I wish to protect these files with a locking class, so that anyone can read the file as long as noone is writing and only one thread can be writing the file at one time.
I will have a whole list of files so I will have to maintain a thread safe list of locked files and protect them using the reads/writers locking method.
Does anyone have an implementation of the readers/writers lock for multiple files. A solution should use win32 syncronisation routines.