Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3403244
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:14:13+00:00 2026-05-18T05:14:13+00:00

I am trying to do multiple image uploads via the <cffileupload> tag. The tag

  • 0

I am trying to do multiple image uploads via the <cffileupload> tag. The tag calls a file called fileupload.cfm to process / finalize the image.

Inside that image I want to start off a thread (here is where I might not understand threading, so let me know) so that I can reply ‘image uploaded’ back to the flash upload app, but initiate a thumbnail generation process (which might last 1 min or so, depending on the file size).

So far I added something like:

<!--- BUILD A THREAD TO CREATE / GENERATE THUMBNAILS --->
<cfthread action="run" name="t#qMid.mid#">
    <cfinvoke component="core.media-functions" method="generateThumbnails">
        <cfinvokeargument name="mid" value="#qMid.mid#">
    </cfinvoke> 
</cfthread>

I am calling the generateThumbnails method, and using a media id (mid) as reference on which item to process. I think the thread dies tho as soon as we reach the end of the fileupload.cfm file.

Not sure if this is just something I should try to run after all files are uploaded?

Thoughts? Not sure how to get this working properly.

EDIT

After some tinkering, looks like I had an error unrelated to the thread which I fixed, but should I keep anything in mind with ‘leaving’ threads like this? Should I kill them at some point? Will they just be cleaned up after completion? How can I put a ‘max execution time’ on a thread?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:14:14+00:00Added an answer on May 18, 2026 at 5:14 am

    If you run a thread and do not actually call <cfthread action="join" /> at some point later the thread will run, in parallel to your page execution thread, and if necessary will run for much longer until it completes its task.

    There is no problem leaving threads run like this – they will be cleaned up as you’d expect once they complete.

    If you want to see if a thread is running just run cfstat which will list all running requests – even ones kicked off by cfthread.

    You’ve probably seen the CF docs here but further to that check out Ben Nadal’s investigation here.

    As for thread timeouts – you can specify a max time to wait for threads you created to rejoin page execution, but AFAIK there is no way to put a timeout (like a page request timeout) on the thread you created.

    Hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use multiple attributes in my custom tag, e.g.: <mytaglib:mytag firstname=Thadeus lastname=Jones
I am trying to streamline a complex process of storing information in multiple tables
I am trying to embed multiple external websites into one web page. Using an
I'm trying to search multiple attributes in XML : <APIS> <API Key=00001> <field Username=username1
I am trying to match multiple CSS style code blocks in a HTML document.
I am trying to merge multiple excel files using DataTable.Merge() option For Each fileName
I am trying to replace multiple rows in an Access database to follow a
We are automating Excel using VB.Net, and trying to place multiple lines of text
I'm trying to use the freeware Multiple Find And Replace 1.00 suggested in this
I am trying to have a tooltip on multiple lines. how do i do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.