Ahh, Thats funny, would have just been easier to give me your page ;)
So we do all that local var stuff, thus should be good. Regards Dale Fraser http://dalefraser.blogspot.com -----Original Message----- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark Mandel Sent: Wednesday, 6 June 2007 12:52 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Object Locking http://www.google.com.au/search?source=ig&hl=en&q=CFC+thread+safe&btnG=Googl e+Search&meta= Mark On 6/6/07, Dale Fraser <[EMAIL PROTECTED]> wrote: > > > > > Ok, > > > > So thread safe, I'm not really sure what this means. Well I know what it > means, but what would be an example of something that's not thread safe so > that I can think if my example would be safe. > > > > My thinking is that if the call to the object doesn't modify the object it's > self then it's safe, is that right. > > > > > Regards > > Dale Fraser > > > > http://dalefraser.blogspot.com > > > > > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of Andrew Scott > Sent: Wednesday, 6 June 2007 12:33 PM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Re: Object Locking > > > > > Dale, > > > > This has been discussed many times, and the debate still rages about race > conditions. > > > > The answer to your question will depend on whether a race condition will > occur. What I have done in the past is done a cflock around global variables > within the cfc when being set. This will do two things, one the request is > halted until it is finished by a predecessor and secondly you do not need to > worry about locking outside your package. > > > > Think thread safe. > > > > > > > > > Andrew Scott > Senior Coldfusion Developer > Aegeon Pty. Ltd. > www.aegeon.com.au > Phone: +613 8676 4223 > Mobile: 0404 998 273 > > > > > > > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of Dale Fraser > Sent: Wednesday, 6 June 2007 12:28 PM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Object Locking > > > > This might be a dumb question. > > > > But if I create an instance of an Object at Application level, such as a > logging Object. > > > > Then I want to invoke the log method on every action of every page, do I > need to lock the object before invoking the log method. > > > > Ie > > > > <cfset application.Logger = createObject('component', > 'com.company.data.Logger.init()' /> > > > > Then from other pages > > > > <cfset result = applicationer.Logger.log(username, datetime, event) /> > > > > Or would the <cfset need to have a lock around it. > > > > Regards > > Dale Fraser > > > > http://dalefraser.blogspot.com > > > > > > > > > > > > > > > -- E: [EMAIL PROTECTED] W: www.compoundtheory.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---