Have a look a the tech note below.

Basically it doesn't crash the server like in the "good old days", but there
are still issues with potential race conditons

http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_18235

Regards
Mark

-----Original Message-----
From: Connie DeCinko [mailto:[EMAIL PROTECTED] 
Sent: 30 March 2005 14:22
To: CF-Talk
Subject: RE: Locking shared scope variables

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







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:200690
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