Dennis,

You still need to do all your own locking under CF5.

CFMX is where it will do simple read or write locks, but is required for
logical reasons as Raymond indicated.

Regards

Stephen
> Hello,
>
> At the risk of being charged with equine abuse, I just want to be sure
that
> I understand the locking issue. Especially since every time I think I
> understand some one says something to change my worldview.
>
> We are still using CF 4.0.1 so I assume that locking to prevent memory
> corruption is required.
>
> In the attached message, Mr. Camden implies that at some version level,
and
> I assume it is CF5 and CFMX, locking session, application and server
> variables to prevent memory corruption is _not_ required.  However running
> code within an application in two browser windows, simultaneously, using
the
> same session (same CFID/CFTOKEN) can cause unpredictable results when
> manipulating "memory variables" in the session and application scope.
>
> To further illustrate what I think he was inferring, assume that I had a
> page that took an input, did a query, and then added the query count to a
> session variable.  I open two browser windows and supply different inputs
to
> the same template in each window.
>
> Window 1:
> Session.x = 1
> Input = a
> Query time = 5ms returns a value=5
> Session.x=session.x + querycount
>
> Run separately he session.x value should be 6
>
> Window 2:
> Session.x = 1
> Input = e
> Query time = 15ms returns avalue=5000
> Session.x=session.x + querycount
>
> Run separately the session.x value should be 5001
>
> However if I run the template in the two browser windows simultaneously,
> where cfid/cftoken is the same, I _could_ get a result of session.x = 5006
> in window 2 since window 1 finished first.  Is this correct?
>
> It appears as if I have never _really_ understood the reasons behind the
> locking issue and only just the safety guidelines, so any and all help is
> greatly appreciated.
>


______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to