Multi-threaded programming in BlueDragon 7.0 (CFTHREAD/CFJOIN)
I can't keep quiet about this stuff--it's just too good. One of the coolest new features of BlueDragon 7.0 is the ability to do multi-threaded programming. The basic idea is very simple: any CFML code wrapped in the new CFTHREAD tag is rendered on a separate thread while the main (request) thread continues processing concurrently. The main (request) thread can wait for the CFTHREAD by using the new CFJOIN tag. Here's what it looks like:
<cfthread name="myThread">
<!--- myThread has a new Variables scope, like a custom tag, and
can access the Application scope and tag Attributes --->
<cfset variables.greeting="Hello, World">
<!--- ...do some more work here... --->
</cfthread>
<!--- myThread is initially an empty struct --->
<cfdump var="#myThread#"> <!--- ...do some more work here... --->
<!--- wait for myThread to finish --->
<cfjoin thread="myThread">
<!--- myThread now contains the Variables scope of the CFTHREAD body --->
<cfoutput>#myThread.greeting#</cfoutput>
"So what is this possibly good for?", you might ask. Or maybe you already know. In either case, be sure to come to my CFUNITED keynote presentation on Friday, June 30 at 11:00 am where I'll talk about this and other new BlueDragon 7.0 features in detail. See you there!


Or will I just have to wait till next week?
Yes, all new BD 7.0 features will be available in JX, and there will be no feature limitations in JX versus BD/J2EE. For example, CFDOCUMENT in JX will be multi-threaded, not limited to a single thread as it is in CFMX Standard.
Yes, there will be a limit on the number of threads that can be created using CFTHREAD. We're still discussing different ways to implement this.
This is awesome. I can finally now CFHTTP to two sites without waiting for the first to finish. That's it, I'm switching to BD.NET. I need to know what the pricing is going to be for this puppy.
Glad you like it (it's my favorite new feature in BD 7.0). Pricing for BD.NET 7.0 will be the same as it is currently: $2999/CPU. Volume discounts are available; for more info contact sales@newatlanta.com.
Thank you and Best regards
Luis Rueda