Skip to content

Instantly share code, notes, and snippets.

@l-brett
l-brett / threads.cfm
Created February 11, 2019 12:57
Coldfusion - Get a list of all current threads
<!--- Create the thread object --->
<cfobject type="JAVA" action="Create" name="thread" class="java.lang.Thread">
<!--- Get all stack traces from the thread object --->
<cfset stackTraces = thread.getAllStackTraces()>
<!--- Convert the keySet to an array --->
<cfset keys = stackTraces.keySet().toArray()>
<style>
.text {