I turned this into a UDF for anyone interested:

<cfscript>
function setThreadPriority(newPriority){
var thread = createObject("java", "java.lang.Thread");
if (arguments.newPriority le thread.max_priority and arguments.newPriority ge thread.min_priority){
thread.setPriority(arguments.newPriority);
return true;
}else{
return false;
}
}
</cfscript>

Example call:
<cfset foo = setThreadPriority(3)>

This will only run under CFMX and higher.

-Joe
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to