I'm presenting on Concurrency in ColdFusion at CFObjective this year, and I'd like to hear how you're using CFThread in your ColdFusion applications.

In addition, what problems have you had while using it, and how (if at all) have you solved them?

What do you dislike about CFThread?

Have you run into significant weaknesses with CFThread or other problems where it simply could not do what you wanted to do?

Finally, if there's anything you'd like to add related to concurrency in CF, not specifically related to CFThread, please do tell.

  • Hi Marc. Questions asking for sharing experiences, polls, and similar type questions are not a constructive question per the FAQ. – maple_shaft Apr 6 '12 at 1:09
  • 2
    so where's a good place on the Stack* network to ask this? – marc esher Apr 6 '12 at 2:57
  • As far as I know, none. All of the SE sites are Q&A sites and we all try to discourage discussions and polls. If not then we just become another Yahoo Answers filled with content that isn't useful to anybody. We do have the chat room link however that allows users to ask such questions and get real time responses however so i suggest trying that. – maple_shaft Apr 6 '12 at 13:23
  • 2
    When I first came to the site, I saw this: screencast.com/t/5E3HxHKq (It is no longer there after logging in). If Marc's question is not considered 'conceptual' than we obviously use drastically different definitions of the word. Also, maple_shaft, can you tell me why this question, programmers.stackexchange.com/questions/24936/…, was not 'closed' for the same reason? – Scott Stroz Apr 6 '12 at 14:56
  • 1
    More questions that should be closed based on your criteria: programmers.stackexchange.com/questions/177/… programmers.stackexchange.com/questions/30057/… programmers.stackexchange.com/questions/57809/… Each of those questions fall into the same categories of 'no nos' you stated for this one. Why the discrepancy? – Scott Stroz Apr 6 '12 at 15:09

CFthread has been a handy little tool :)

  • One thing I've used cfthread for is background image resizing. If a user uploads a large image (let alone many users), it needs to be resized. Threads work well.


As for sticky areas, one area that's sticky / unclear for starting out with threading is how to best pass information in and out of a cfthread call. One of the things that a cfthread generally needs is to be completely self contained -- so you have to pass in the information it needs when you make the cfthread call.

Knowing how to do joins (if required) vs, when you can pass in the information so the thread can spawn and complete entirely on it's own is helpful.

0.05 :)

| improve this answer | |

I've used cfthread alot with batch processing - and more around memory management than anything else.

So if I have 80,000 records I need to process, I will often loop around, do the processing in a thread, and then join it back up at the end.

This doesn't give me any speed increase, but it does often mean I don't get memory overflows as the data processed in the thread is easily garbage collectable.

Oh, what I don't like about cfthread? on ACF, I'm limited by my Licence. That drives me nuts.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.