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

1.5k views Asked by At

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?

1

There are 1 answers

3
Yisroel On BEST ANSWER

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.