On Apr 4, 2005 12:21 PM, Cliff Meyers <[EMAIL PROTECTED]> wrote:
> Is that locking implemented inside the cffunction tag for the method (A),
> or around the call to the method itself (B)?

It depends. If a CFC is specifically designed to live in application
scope then internal locking is probably the way to go - if you need
locking at all. If a CFC can be used in a transient scope then it
shouldn't lock internally - locking should be the job of the code that
puts the CFC into a shared scope.

So it's really about responsibilities.

> I'm guessing you're going to say "B" since the Mach-II framework has
> several CFLOCKs in the mach-ii.cfm file but none in the framework CFCs

The locks are only there to ensure that the initialization is thread
safe (i.e., no race conditions).
-- 
Sean A Corfield -- http://corfield.org/
Team Fusebox -- http://fusebox.org/
Got Gmail? -- I have 50, yes 50, invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]


Reply via email to