0

Looking at some legacy code and the programmer in question uses:

<cfthread action="run">
    <cfexecute name="c:\myapp.exe" timeout="30">
</cfthread>

Can one safely replace the code above with this?

<cfexecute name="c:\myapp.exe" timeout="0">

Is CF going to spawn up a thread in the code above anyway? And is the thread going to be counted towards "Maximum number of threads available for CFTHREAD"?

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Henry
  • 32,689
  • 19
  • 120
  • 221

1 Answers1

3

If the intent is to have a non-blocking flow of the code, then you can safely replace the earlier code with yours.

In my understanding, CF is not creating a thread when it gets a timeout="0". It must be just calling the exe (which creates a new process on server) and never wait for the process to reply. So, nothing is added to the thread limit count.

Sanjeev
  • 1,838
  • 1
  • 16
  • 28