Well that's essentially what Jim suggested, but it's not thread-safe unless you write it the way Jim described.
> Why not just set an application variable when you enter > the lock, and > test for the value of that application variable. If it is > set to true > for instance, tell them no, and use a meta refresh to try > again in so > many seconds... Just make sure you set the variable to > false when then > process finishes... > On 9/14/05, S. Isaac Dealey <[EMAIL PROTECTED]> wrote: >> >> -----Original Message----- >> >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] >> >> Sent: Wednesday, September 14, 2005 9:54 AM >> >> To: CF-Talk >> >> Subject: Re: Detecting CFLOCK >> >> >> >> >> >> I don't usually write locks that are designed to throw >> >> errors... I >> >> generally write locks that are designed to wait for >> >> the >> >> previous lock >> >> to release, and so I think my memory of how exactly >> >> the >> >> timeout works >> >> > I agree - I don't like to include exceptions as logic >> > gates unless you >> > really, really need to. >> >> > A slight variation on this that would eliminate the >> > need >> > for the exception >> > is: >> >> Good call, Jim! :) >> >> I've just not worked with situations where I needed to >> use cflock on >> an optional process. At least not that I can recall... >> >> >> s. isaac dealey 954.522.6080 >> new epoch : isn't it time for a change? >> >> add features without fixtures with >> the onTap open source framework >> >> http://www.fusiontap.com >> http://coldfusion.sys-con.com/author/4806Dealey.htm >> >> >> >> >> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218352 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54