Short answer: YES! You have to lock any reads or writes to server,
application, or session variables throughout your application. Without
locking these variables, your server will become extremely unstable, and you
will get low-level errors like C++ errors. These will not show up until you
get some load on the server though. Also, you need to lock all calls to
these scopes, and make sure not to miss any. When all of them are locked but
a few, those few can gain access even if there is already a lock, and you
will have the same problems.

There are quite a few Knowledge Base articles on the Allaire site about
this. I also know that Forta has written at least one article on it which
you should also be on the Allaire site.

Also, there are ways around having to lock everything, and you can find
examples in the KB articles. It involves using the request scope to store
your application and session variables.

Hope this helps!

Jason



----
Jason Aden
webworld studios, inc.
(703) 864-2434
[EMAIL PROTECTED]
www.wwstudios.com

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 10, 2000 12:09 AM
To: CF-Talk
Subject: When to use CFLock


At the ColdFusion Developers Conference, at one of the sessions, we were
told
to use CFLock for all session variables, both when setting them and when
reading them. And that this was especially important for ColdFusion 4.5
because it runs 12 times faster than ColdFusion 4.0 and without all those
CFLocks everywhere, you might crash the server.

Is this true?
Do I really need to CFLock up my application all over the place?

I just got finished reading the Fusion Authority weekly news alert from
February where an attempt was made at a ColdFusion style guide and I quote,

"Lock memory-based state management variables - In CF 4.0 and 4.01, you have
to lock the setting of memory based state management variables (Server,
Application, Session). If you don't, you may find a situation where a value
is being written to memory at the same time as it's being read. This will
result in a PCode error. This has been slightly fixed in 4.5 (thanks to Seth
Petry-Johnson for reminding me). "

So I ask again.

Do I need to lock variables in v. 4.5 or don't I???????

Thanks,

Jo-Anne Head
----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to