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

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -