Page 1 of 1

DupLock()

Posted: Tue Jul 21, 2015 7:49 pm
by JosDuchIt
What is the use of DupLock() ?

why would one have two lockson the same file?
Are more locks 3,4 ..possible? i guess not, hence AddLock would be a better name .

Re: DupLock()

Posted: Wed Jul 22, 2015 1:04 am
by colinw
JosDuchIt wrote:What is the use of DupLock() ?
why would one have two lockson the same file?
Are more locks 3,4 ..possible? i guess not, hence AddLock would be a better name .
It doesn't just work on files, and yes, you can have any number of SHARED_LOCKs.
For example, how would you give a new process a copy of the spawners current directory lock. ?