File Locking in C++ For simultaneous Read and Write Lock -


how can lock file read , write operation. if "abc" file name in write lock, provide read lock on same locked file. in normal case want wait till write operation completion.so if there ways acquire kind of locking

many programs use lock file signify file in use writing.

the lock file later removed when done writing.

for example, when process #1 start writing file example, creates file example.lock. later when done writing, removes example.lock.

when process #2 want read file example first checks if file example.lock exists. if file locked write operations , process #2 have wait.


Comments

Popular posts from this blog

How to logout from a login page in asp.net -

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -