Thread Cannot be Modified Outside Thread Scope

I have been fighting with this issue for a while and finally figured out how to to duplicate.

<cftry>
	<cfthread name="test" action="run" threadname="test">
		<cfset [1,2,3,4,5,6,7,8,9,10].each(function(key){
			var test = key;
		}, true)>

		<cfset thread.testing = 'blah'>
	</cfthread>

	<cfthread action="join" name="test">

	<cfdump var="#cfthread.test#">

	<cfcatch>
		<cfdump var="#cfcatch#">
	</cfcatch>
</cftry>

Lucee 5.3.10.120 / Windows 2019 / Correto JRE

The thread is not being modified outside the thread scope. Any suggestions?

https://luceeserver.atlassian.net/browse/LDEV-3116

slipped thru the cracks…

@Zackster yeah, I have had this error in my logs forever and stumbled upon it what was causing it. The error in my logs was a normal thread calling a function with a thread in it. I have an s3 component that will upload an array of files concurrently.

I would also check cfthread inside cfthread where at the end of first thread you access thread scope.