Does ColdFusion fire CFEXECUTE and then leave or does it wait for CFEXECUTE to complete?

StackOverflow https://stackoverflow.com/questions/7933480

  •  16-02-2021
  •  | 
  •  

Question

I am using ColdFusion 9.1.2

We are using a CFC to save some data via a query. After the query runs, there is a CFEXECUTE. Once that completes, which can take 30 seconds, I want to query the database that the CFEXECUTE wrote something to and return a variable. If anything gets out of order, nothing will be correct.

My question is whether CFEXECUTE fires and the ColdFusion goes onto the next thing, or does ColdFusion wait until the CFEXECUTE is complete?

Was it helpful?

Solution

The timeout attribute determines this.

From the docs

Timeout

Length of time, in seconds, that ColdFusion waits for output from the spawned program.

  • 0: equivalent to nonblocking mode.
  • A very high value: equivalent to blocking mode.

If the value is 0, ColdFusion starts a process and returns immediately. ColdFusion may return control to the calling page before any program output displays. To ensure that program output displays, set the value to 2 or higher.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top