Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!andrews From: andrews@Apple.COM (Richard Andrews) Newsgroups: comp.protocols.appletalk Subject: Re: TOPS, AFP, et al Message-ID: <32291@apple.Apple.COM> Date: 6 Jun 89 20:08:59 GMT Reply-To: andrews@apple.com (Richard Andrews) Organization: Apple Computer Inc, Cupertino, CA Lines: 18 >>But the question is, is it _advisory_ or _mandatory_ locking? >>Methinks it's the latter. >>PS: Anybody at Apple listening? Care to enlighten us in these matters? Yes, we were listening. Allow me to set the record straight. Byte range locking in AFP is mandatory. Before reading or writing a range, you must lock it, otherwise the read or write operation could fail with a RangeLocked error. Locking a range reserves it for your exclusive use. When you are finished using the range, you should call UnlockRange. However, if you don't, all the ranges you locked with a given refnum will be unlocked when you issue a Close call with that refnum. Rich Andrews