Wow, this thread sure kicked off.

While we've got the attention of all these big brains, can we just agree
that Jason's problem has nothing to do with locking or lack thereof?  There
are certainly race condition scenarios when initializing shared scopes (as
per Sean's example) that can *look* like a new session is being created,
where in fact all that's happened is you've clobbered your existing session
variables.  But the fact that Jason is seeing new session IDs indicates that
the problem is something completely different.  Yes?

Jaime Metcher

> -----Original Message-----
> From: Andrew Scott [mailto:[EMAIL PROTECTED]
> Sent: Monday, 16 April 2007 7:18 AM
> To: CF-Talk
> Subject: Re: Using CFCs in session scope - need cflock help
>
>
> Sean,
>
> A race condition is as stated in one of my previous posts.
>
> And I quote again...
>
>
> If thread one, is running and it checked the condition
> session.flag is true
> and while halfway through that check, the variable is changed it
> is going to
> cause a few problems.
>
> If for instance I have a serious of variables and while I need to
> use those
> variables, and whil reading them in and they change, the results are going
> to be unexpected dat results.
>
>
>
>
>
> On 4/16/07, Sean Corfield <[EMAIL PROTECTED]> wrote:
> >
> > On 4/15/07, Andrew Scott <[EMAIL PROTECTED]> wrote:
> > > > <cfset application.flag = true />
> > >
> > > no on its own that can not cause a race condition, but if
> somewhere else
> > > there is a read on that variable somewhere then that will cause a race
> > > condition.
> >
> > Wrong.
> >
> > Code can read that variable to its heart's content all over the
> > application without a race condition.
> >
> > > Now as this debate is being discussed because of a CFC inside of a
> > session
> > > scope, there is an extremely high chance that a race condtion is going
> > to
> > > occur, so as Ben says lock it.
> >
> > Not necessarily true. You can have a bean in session scope and never
> > need to lock it. If the operations are *atomic*.
> >
> > You are just simply refusing to listen to what people are telling you
> > and you aren't reading the documents closely enough. I don't think you
> > actually understand what a race condition is...?
> > --
> > Sean A Corfield -- (904) 302-SEAN
> > An Architect's View -- http://corfield.org/
> >
> > "If you're not annoying somebody, you're not really alive."
> > -- Margaret Atwood
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275297
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to