Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question

closed as off topic by Oded, gnat, Robert Harvey, maple_shaft Apr 6 '12 at 1:07

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
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
show 2 more comments

2 Answers

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.

Observations:

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 :)

share|improve this answer
1  
Thanks for your comments, Jas! –  marc esher Apr 5 '12 at 23:20
add comment

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.

share|improve this answer
add comment

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