Force CF to wait w/o killing the CPU
Many times we have been into the situation where we need to tell CF to wait a couple of seconds and try again. This task is usually easy, with the exception that we don’t want to kill the CPU… Easily we could set a timestamp, and start looping until we reach a target time after that. I downloaded from ColdFusion exchange a cfx tag that promised to accomplish this but it killed the CPU anyway.
So, here’s a little snippet to wait idle using the CF JVM.
var thread = createObject("java","java.lang.Thread");
thread.sleep(ms);
}
http://www.robgonda.com/blog/trackback.cfm?91A4D787-2B3E-FB41-5CAF6276ECBE0025
There are no comments for this entry.
[Add Comment]