ColdFusion 8: thread sleep

Posted At : May 31, 2007 1:29 PM | Posted By : Dave
Related Categories: ColdFusion

Ok, now this is one of the reasons I love CF. I love it when something I have been doing the long way for ever instantly becomes easy. Sleeping a thread is one of those things. I have been using the java method since CF6 to pull this off. Now it is a simple function. For example...

Old School sleep method:

<CFSCRIPT>
thisThread = CreateObject("java", "java.lang.Thread");
thisThread.sleep(1000);
</CFSCRIPT>

New School sleep method (there are 3):
<CFSCRIPT>
sleep(1000);
</CFSCRIPT>
or
<CFSET sleep(1000)>
or
<CFTHREAD ACTION="SLEEP" DURATION="1000">

Making our lives easier. Just another reason to love CF.

--Dave

Comments

There are no comments for this entry.

[Add Comment]