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.

	<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 action="join" name="test">

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

		<cfdump var="#cfcatch#">

Lucee / Windows 2019 / Correto JRE

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

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.