In Lucee 220.127.116.11 I'm running into an issue with some code that used to work on Lucee 4.5.5.015 and Railo. The code has 2 threads, the first one running an operation and the second thread waiting on the first to complete before doing it's operation. To do this, the second thread has a condition loop that checks the first thread's status. If it's set to complete then it continues with it's operation.
In Lucee 4.5, the code works as intended. In Lucee 5.2 though an error saying the key doesn't exist on cfthread is thrown.
I've attached an example where the code does the exact same thing, but the first thread writes to a file every 1/2 a second with it's current index (25s runtime), and the 2nd thread writes the status of that thread every second to a file until the first thread is complete. In Lucee 4.5 this works as expected, but again in Lucee 5.2 the error "key [test_thread] doesn't exist" is thrown and you can see it in the dump of cfthread. If you dump the cfthread object to a file inside of either thread you get an empty struct as well in Lucee 5.2.
Docker - lucee/lucee:5.2-alpine