Mark Kruger wrote:
> Ian,
>
> Ok... What if you strip out the DB calls and strip out the Report calls -
> just run the thread creation and removal. Do the threads terminate then?

Nope they do not terminate.  I removed all the database and report logic 
and just wrote a simple file with a simple string in it.  It took less 
then a second do this for 50 instances, but all 50 threads are still 
running as I type this message.

<cfloop index = "i" from="1" to="50">
    <cfset threadList = listAppend(threadList,"batchRenew_thread#i#")>
  <cfthread name="batchRenew_thread#i#" threadIndex="#i#" action="run">

      <!--- PATH ---> 
      <cfset pathDate = #DatePart("yyyy", Now()).toString()#/> 
      <cfset vOutputFilePath = RENEWALS_FILE_PATH/>
      <cfset vOutputFilePath &= pathDate & "\"/>
      <cfset vOutputFilePath &= 
Trim(#ResultFirms["firmno"][threadIndex]#) & "\"/>   

      <!--- CREATE OUTPUT PATH --->
      <cfif DirectoryExists(#vOutputFilePath#) is False>
        <cfdirectory action="create" directory=#vOutputFilePath#/>
      </cfif>
     
      <!--- FILE NAME --->
            <cfset vOutputFilePath &= 'foobar.txt'>
           
            <cffile action="write" nameconflict="overwrite" 
file="#vOutputFilePath#" output="TESTING #timeFormat(now(),'hh:mm:ss:l')#">
  </cfthread>
</cfloop>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307431
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to