Evik James
Evik James

Reputation: 10503

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

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?

Upvotes: 2

Views: 1555

Answers (1)

Yisroel
Yisroel

Reputation: 8174

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.

Upvotes: 6

Related Questions