[futurebasic] Re: [FB] LOCK Handles (When?)

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 1998 : Group Archive : Group : All Groups

From: Chris <behmc@...>
Date: Wed, 28 Oct 1998 12:56:11 -0500
>>>Now, if anyone see's a problem with this, please post it!
>>>
>>
>>Yeah, you better be locking that handle before reading/writing it!
>>
>>OsErr% = FN HLOCK(thehandle&)
>>'modify
>>OsErr% = FN HUNLOCK(thehandle&)
>>
>>
>>
>>~ I heart Apple ~
>>
>>-- TJ Grant (tatewake@...)
>
>TJ:
>
>Thank you. The code that I wrote "online" was ctaken from memory. I
>neglected to include any lock-downs. Which brings me to a point that I'm
>not certain about -- and has been discussed before -- which is -- When does
>one lock down handles?
>
>Any one got a _simple_ "rule of thumb" as to when to lock handles?
>
>tedd

Before you modify it ;) I lock them anytime that I am going to use them
(with rare exceptions that I can't remember). I think that "technically"
(or maybe bare minimum?) you have to lock them before you do anything that
could move memory.

Probably not much help overall, but oh well,
*Chris