I thought with CFMX7 we did not need to worry about locks.

-----Original Message-----
From: Mark Smyth [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 30, 2005 6:53 AM
To: CF-Talk
Subject: Locking shared scope variables

I'm trying to standardise a locking strategy when setting/reading shared
scope variables
 
I've did some research and came up with what I thought was a plan,
exclusive-scoped locks for writing variables and readonly-scoped locks for
reading variables.
 
However I crossrefered this against the Macromedia CFMX coding standards and
it has the following:
 
"If the shared resource is in server or application scope, you should use
named locks to control access - and choose a name that uniquely identifies
the resource being locked, e.g., use server_varname when locking an update
to server.varname....

If the shared resource is in session scope, you should generally use a
scoped lock on session itself."

AND

"....most read operations do not need to be locked;"

 

This is the first time I have come across this, so two questions come from
this:

1. Why named locks for application & server variables and scope for session?

2. Why can read locks  be ignored?

 

I'd be greatful for opinions

Thanks

Mark





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200685
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to