阅读背景:

进程间读取器写入器锁(或文件句柄和访问被拒绝)

来源:互联网 

Okay, some background first. We needed an inter-process reader/writer lock. We decided to use a file and lock the first byte using LockEx and UnlockEx. The class creates a file in the system temp folder when it is created. The file is created with readwrite access and share read|write|delete. We also specify DeleteOnClose so we don't leave loads of temp files laying around. Obviously AcquireReader and AcquireWriter call LockEx with appropriate flags and ReleaseLock calls UnlockEx.Okay, some background first. We needed an inter




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: