I have gotten a lot of great feedback and suggestions from yesterday’s post about new ColdFusion features. One that really interests me is the idea of a CFFORK or a CFTHREAD tag. I agree that certain operations would benefit from the ability to happen concurrently (in fact, keep your eye out for DRK 5!), but I’m wondering what specifically people envision spawning new threads for. And what would the programming model be? When you spawn a new thread, execution obviously continues in the original thread, so how do you know when the new thread is finished, or get back the results of whatever operation it performed, or know if an error occurred. One way to do it is with callback functions, which may be something that can be built into components. I have an interesting idea of how this can be done (again, keep an eye out for DRK 5), but I want to get some other suggestions, as well.
By Christian Cantrell
September 25, 2003