Sleep and pause a ColdFusion or Java thread

I find this really useful sometimes. for example when we did the Geocoding of Australian Postcodes I chucked in a sleep thread to the loop so that we wouldn’t hammer google and get banned from running any more geocoding requests. This uses the java.lang.Thread method to pause or sleep the currently running thread. So first […]
Last updated: March 12, 2012

I find this really useful sometimes. for example when we did the Geocoding of Australian Postcodes I chucked in a sleep thread to the loop so that we wouldn’t hammer google and get banned from running any more geocoding requests. This uses the java.lang.Thread method to pause or sleep the currently running thread.

So first we create the object in ColdFusion using the createObject() tag. Then use the .sleep method that is available on a thread object to ask it to sleep for a period of milliseconds we pass in.

Duncan Isaksen-Loxton

Educated as a web developer, with over 20 years of internet based work and experience, Duncan is a Google Workspace Certified Collaboration Engineer and a WordPress expert.
Login
Log in below to access your courses.
Log In With Google
Forgot Password
Enter your email address or username and we’ll send you instructions to reset your password.