This is probably not the best way to do it, but you could throw a CFLOCK around the code and use a NAME lock rather than a scope lock, except in the name user a UUID. You can set a lock timeout that throws an error, and no two locks should conflict.
Again, probably not the best way, but just off the top of my head. <cflock timeout="30" throwontimeout="Yes" name="#CreateUUID()#" type="EXCLUSIVE"> ... Code goes here ... </cflock> ....................... Ben Nadel Web Developer Nylon Technology 6 West 14th Street New York, NY 10011 212.691.1134 212.691.3477 fax www.nylontechnology.com "Vote for Pedro" -----Original Message----- From: wolf2k5 [mailto:[EMAIL PROTECTED] Sent: Friday, December 16, 2005 12:18 PM To: CF-Talk Subject: how to put a timeout around a piece of CF code? Hi, Is there any way to put a timeout for a piece of CF code? E.g. I have a CF script with file operations and db queries, I want to make sure the file/db operations take no longer than a predefined timeout, if that happens the code should throw an error I could catch with the surrounding code. Is it possible at all? Thanks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:227179 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