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



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200673
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to