Not sure would it? I guess that's what im asking.
If I do a named lock of that sort. Then what happens if the next user gets to that code, does it sit and wait for the lock or error. Regards Dale Fraser http://learncf.com From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Gareth Edwards Sent: Friday, 19 October 2007 4:09 PM To: [email protected] Subject: [cfaussie] Re: Application Locking Wouldn't a named lock do what you need? <cflock name="_lucene" type="exclusive" timeout="30"> </cflock> Could set the timeout in seconds to more if need be? Cheers Gareth. Dale Fraser wrote: It is very unlikely that this operation is being run by more than one person at a time, but it is possible. So i'm happy to just make them wait, it's 20-30 seconds. Regards Dale Fraser http://learncf.com -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Haikal Saadh Sent: Friday, 19 October 2007 3:18 PM To: [email protected] Subject: [cfaussie] Re: Application Locking Would a better way be to show a 'Joe Bloggs is running the payroll process, come back later' message when the second person tries to perform this task? Would having all these locks make the next person doing this task wait, or will it make everyone wait? Dale Fraser wrote: What happens if I lock an application scoped variable. I have an application that can perform a task, which would cause trouble if two people were doing that task at the same time. So I thought I could either do it using an application lock block, but i'm not really sure if that would work. The operation takes 30 seconds or less, so i'd be happy for the next person to just wait until the application was ready. The second method I had in mind would be to have <cfloop expression="application.locked = true"> <!--- Do nothing and just wait ---> </cfloop> Not locked <cfset application.locked = true /> Do Task <cfset application.locked = false /> How would you do this. Regards Dale Fraser http://learncf.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
