Not sure if this is a bug or not, I already posted in the slack channel too. In the code below if you run it multiple times you will see that only one key survives requests. Anything set after the thread join is lost on the next page request. Am I doing something wrong or is this a bug? If it is a bug I will create a ticket.
Thanks
<cfscript>
if(!structKeyExists(session, 'mySessionStruct')) {
session.mySessionStruct = {};
}
dump(session.mySessionStruct)
session.mySessionStruct.ISurvive = 'survived';
for(var i in [1,2,3,4,5]) {
thread {
try {
sleep(1000);
throw(type="blah", message="boom");
} catch(e) {
dump(session.mySessionStruct);
}
}
}
thread action="join" name=cfthread.keyList();
session.mySessionStruct.IAmLost = 'goodbye';
dump(session.mySessionStruct);
</cfscript>