Reliability of file locking on network files

佐手、 提交于 2019-12-12 14:53:26

问题


I read that file locking on network files isn't very reliable.

I'm using those LockFile/LockFileEx/UnlockFile win32-api functions for range-locks. Does anyone have some experience of using those functions on files living on a network-share?


回答1:


Win32 file locking mechanisms are reliable IF they're done to a remote CIFS share. There have been many flat file databases that work just quite reliably using these mechanisms for decades.

They're not reliable if they're done on a remote NFS share (as Jim Lewis mentioned).



来源:https://stackoverflow.com/questions/1255219/reliability-of-file-locking-on-network-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!