Last active
October 7, 2022 17:11
-
-
Save jamiejackson/c50e8da82f3858abd61beac0b70bdf3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
thread name="createObjectThread" { | |
thread.hello = "foo"; | |
sleep(40); | |
} | |
keepLooping = true; | |
loopTimeout = 20; // (ms) | |
while (keepLooping) { | |
if (createObjectThread.elapsedTime > loopTimeout) { | |
keepLooping = false; | |
threadTerminate('createObjectThread'); | |
} | |
sleep(5); | |
} | |
if (createObjectThread.status == "Terminated") { | |
writeDump("Thread was terminated after #createObjectThread.elapsedTime#ms. (Timeout is #loopTimeout#ms.)") | |
} else { | |
writeDump("Thread completed in #createObjectThread.elapsedTime#ms.") | |
} | |
writeDump(createObjectThread); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment