I've only really used the cfthread tag when I have a process that is going to take longer than my server's request timeout. I'm sure there are more uses for it.
For what you're trying to do you probably want to use the background attribute of cfquery instead though. That will make openbd add your query to a queue and run it in the background when resources are free.
On Mon, Jul 30, 2012 at 1:20 PM, Aaron J. White <a...@aaronjwhite.org> wrote:
> For what you're trying to do you probably want to use the background
> attribute of cfquery instead though. That will make openbd add your query
> to a queue and run it in the background when resources are free.
Right, if that's all you want to do I'd go that route. Simpler and makes
the code clearer to boot.
Open BlueDragon allows use of a BACKGROUND attribute with CFQUERY. When
BACKGROUND is set to TRUE, the query is run in a background thread and
processing does not wait for the query to complete before continuing.
This differs slightly than using
CFTHREAD<http://wiki.openbluedragon.org/wiki/index.php/CFTHREAD> to
run a query. When the BACKGROUND attribute is used, a single background
thread is used for all background operations, and the background operations
are queued. When CFTHREAD is used a new thread is spawned.
Two log files are kept to track the progress of these queries.
§ querybatch.log - for successful executions
§ querybatch-errory.log - for exceptions and errors, printing out the SQL
statement of the problem
Thank you,
Randy
*From:* openbd@googlegroups.com [mailto:openbd@googlegroups.com] *On Behalf
Of *Matthew Woodward
*Sent:* Monday, July 30, 2012 9:56 PM
*To:* openbd@googlegroups.com
*Subject:* Re: [OpenBD] Re: Valid Use Case for CFTHREAD
On Mon, Jul 30, 2012 at 1:20 PM, Aaron J. White <a...@aaronjwhite.org> wrote:
For what you're trying to do you probably want to use the background
attribute of cfquery instead though. That will make openbd add your query
to a queue and run it in the background when resources are free.
Right, if that's all you want to do I'd go that route. Simpler and makes
the code clearer to boot.
> Open BlueDragon allows use of a BACKGROUND attribute with CFQUERY. > When BACKGROUND is set to TRUE, the query is run in a background > thread and processing does not wait for the query to complete before > continuing.
> This differs slightly than using CFTHREAD > <http://wiki.openbluedragon.org/wiki/index.php/CFTHREAD> to run a > query. When the BACKGROUND attribute is used, a single background > thread is used for all background operations, and the background > operations are queued. When CFTHREAD is used a new thread is spawned.
> Two log files are kept to track the progress of these queries.
> �querybatch.log - for successful executions
> �querybatch-errory.log - for exceptions and errors, printing out the > SQL statement of the problem