Sean/Jeff,

Everything you said at the beginning makes perfect sense to me.  Thank
you.  I'm glad that I wasn't horribly off-base in assumptions I'd made to
date.

> Yes, you need to consider thread safety when using objects stored in
> shared
> scopes which means you might need to lock for certain method calls.

Is that locking implemented inside the cffunction tag for the method (A),
or around the call to the method itself (B)?

A:
cffunction
  cflock
    ...
  /cflock
/cffunction

B:
cflock
  myObj.myMethod(param1, param2...)
/cflock

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
themselves. :)  I suppose to be "safe" one should probably stick to
exclusive locks since specifying a readonly lock would in effect "break"
encapsulation since you'd have to "know ahead of time" that data wasn't
being written to the instance variables of the object and only read.  Kind
of a nuanced point I suppose.

Anyawys, thanks again for taking the time to answer my questions!  Now
that these are mostly out of the way I can start my Mach-II/Tartan
development in earnest :)


-Cliff


----------------------------------------------------------
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