Skip to content

Commit bb304e9

Browse files
committed
remove threads from cfthreads no longer needed
1 parent 8649b81 commit bb304e9

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>org.lucee</groupId>
66
<artifactId>tasks-extension</artifactId>
7-
<version>1.0.0.1-SNAPSHOT</version>
7+
<version>1.0.0.15-SNAPSHOT</version>
88
<packaging>pom</packaging>
99
<name>Tasks Extension</name>
1010

source/components/org/lucee/cfml/TasksGatewayImpl.cfc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,8 @@ component {
379379

380380
// do have other servers changed the pause settings?
381381
if(!isEmpty(settingLocation) && variables.checkForChangeSettingInterval>0 && lastCheckSettings+variables.checkForChangeSettingInterval<getTickCount()) {
382-
// TODO do we need to flush the cfthread scope after this?
383-
thread gatewayId=(gatewayId?:"") owner=owner tasks=tasks logName=logName settingLocation=settingLocation {
382+
var threadName="t#createUniqueID()#";
383+
thread name=threadName gatewayId=(gatewayId?:"") owner=owner tasks=tasks logName=logName settingLocation=settingLocation {
384384
try {
385385
loop struct=tasks index="cfcName" item="local.el" {
386386
var paused=owner.getPause(settingLocation, gatewayId, (el.id?:""));
@@ -392,6 +392,8 @@ component {
392392
log text="Tasks Event Gateway in controller" exception=e type="error" log=logName;
393393
}
394394
}
395+
// because we don't need the thread reference we simply remove it
396+
structDelete(cfthread, threadName, false);
395397
lastCheckSettings=getTickCount();
396398
}
397399
}

0 commit comments

Comments
 (0)