>>What exactly are you trying to accomplish? > Thanks for your reply.
> I'm using CFDOCUMENT enclosed in an exclusive CFLOCK to > create a _BIG_ PDF file in a shared server environment. > Under typical server load it takes around 30 seconds or so > to create the PDF. However, sometimes it can take much > longer -- or forever (literally). To keep the user amused > while they wait, they get to watch a progress bar thingy. > A javascript redirects to an ERROR screen after 60 > seconds. > While "USER A" is waiting for her PDF to be created I > would like to prevent "USERS B,C,D..." from queing > requests and display a "PLEASE WAIT" message or something. > That's why I want to know when the CFLOCK is released. Oh you mean "Please try again later"... <cftry> <cflock name="makepdf_wrapper"> <!--- this lock ensures single threading to the whole thing ---> <cflock name="makepdf" type="exclusive" timeout="1"> <!--- this lock checks to see if it's available ---> </cflock> <cflock name="makepdf" type="exclusive" timeout="60"> ... make the pdf ... </cflock> </cflock> <cfcatch> <!--- if it's not available the 2nd lock will throw an error to this catch ---> Please try again later </cfcatch> </cftry> This will pretty quickly throw the "please try again" up in front of anyone who tries while someone else has the lock... hth 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218094 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54