![]() |
![]() |
![]() |
![]() |
![]() |
FTP | ![]() |
![]() |
CCD | ![]() |
![]() |
Buscar | ![]() |
![]() |
Trucos | ![]() |
![]() |
Trabajo | ![]() |
![]() |
Foros | ![]() |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
![]() |
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
perdon son checklistbox con las rutas... y progressbar para ver que lo esta haciendo constantemente...
|
#2
|
|||
|
|||
ok pero estaria bien que me contestaras algunas de las preguntas que te he hecho, porque sino, seguimos estando igual :
- creas (metodo create) correctamente el hilo? prueba de poner antes del primer try en .execute : if (self) = nil then Showmessage('no asignado') a ver si te salta este mensaje - creas y destruyes correctamente el query? - es posible que una vez terminado el hilo, lo destruyas y luego lo vuelvas a llamar sin haberlo recreado? tal como te dije, a estas alturas si pusieras el codigo entero (o adjuntado) del metodo donde te salta la excepcion... y del .create tambien. venga saludos y suerte |
#3
|
|||
|
|||
y hilo1, hilo2, etc... los creas? haces hilo1 := Thilomuestra_Estado.create(checkbox1,1)?
|
#4
|
|||
|
|||
oye gracias...es un codigo al que le hago mantenimiento y no cabe...... revise como me dijiste y separé el código de los hilos .......
parte i unit Unit6; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, StdCtrls,inifiles, ExtCtrls, CheckLst,QDialogs, Buttons,math, Grids, DBGrids, Psock, NMFtp, Menus, Mask, FileCtrl, SBSftpCommon, SBSimpleSftp, SBX509, SBCustomCertStorage, SBPGPKeys,SBSSHKeyStorage,SBSSHConstants, SBUtils,DateUtils,registry,db,dbtables; const SFTP_BLOCK_SIZE = $10000; type Tordenesdias = array[1..7] of string; type Thilo_mostrandoestados = class(TThread) private FBox: TCheckListBox; Fcajon,mensaje,codruta,accion,tipo_de_sinc : String; // estadocomparando : integer; protected procedure Execute; override; procedure MostrarProgreso; procedure MostrarProgreso2; public constructor Create(Box: TCheckListBox;cajon : string); // destructor Destroy; override; end; type Thilo_mostrandoestados2 = class(TThread) private FBox: TStringGrid; Fcajon,mensaje,codruta,accion,tipo_de_sinc : String; estadocomparando : integer; protected procedure Execute; override; procedure MostrarProgreso; procedure MostrarProgreso2; public constructor Create(Box: TStringGrid;cajon : string); end; type TForm6 = class(TForm) PageControl1: TPageControl; TabSheet1: TTabSheet; StringGrid3: TStringGrid; StringGrid2: TStringGrid; CheckListBox2: TCheckListBox; CheckListBox6: TCheckListBox; CheckListBox3: TCheckListBox; CheckListBox5: TCheckListBox; CheckListBox4: TCheckListBox; CheckListBox7: TCheckListBox; CheckListBox1: TCheckListBox; SpeedButton28: TSpeedButton; ProgressBar10: TProgressBar; ProgressBar7: TProgressBar; ProgressBar6: TProgressBar; ProgressBar8: TProgressBar; ProgressBar9: TProgressBar; ProgressBar5: TProgressBar; ProgressBar4: TProgressBar; ProgressBar1: TProgressBar; StringGrid5: TStringGrid; Memomostrarhilo: TMemo; BitBtn1: TBitBtn; procedure FormActivate(Sender: TObject); procedure FormShow(Sender: TObject); procedure SpeedButton28Click(Sender: TObject); procedure listarrutas; procedure insertarpaso(ruta,paso,tipoproceso,agentes : string); function rutas_en_cajones(posiciones : Tstrings): string; function aumentar(barra : TProgressBar) : boolean; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure BitBtn1Click(Sender: TObject); private { Private declarations } public hilo0 : Thilo_mostrandoestados2; hilo1,hilo2,hilo3,hilo4,hilo5,hilo6,hilo9 : Thilo_mostrandoestados; { Public declarations } end; var Form6: TForm6; implementation uses Unit2, Unit3; {$R *.dfm} procedure TForm6.FormActivate(Sender: TObject); begin hilo0.Resume; hilo1.Resume; hilo2.Resume; hilo3.Resume; hilo4.Resume; hilo5.Resume; hilo6.Resume; hilo9.Resume; end; procedure TForm6.FormShow(Sender: TObject); begin StringGrid3.Cells[0,0] := 'Ruta'; StringGrid3.Cells[1,0] := 'P'; StringGrid3.Cells[2,0] := 'A'; StringGrid3.Cells[3,0] := 'E'; end; procedure TForm6.SpeedButton28Click(Sender: TObject); begin listarrutas; hilo0.Resume; hilo1.Resume; hilo2.Resume; hilo3.Resume; hilo4.Resume; hilo5.Resume; hilo6.Resume; hilo9.Resume; end; procedure TForm6.listarrutas; var i,j,verificador : integer; primero : boolean; begin dt.qbusca.Active := false; dt.qbusca.SQL.Clear; dt.qbusca.SQL.Add('select count(*) as contador from sincronizadas '); dt.qbusca.Active := true; dt.qbusca.First; verificador := dt.qbusca.FieldByName('contador').AsInteger; if verificador = 0 then begin // inicia de ceros for i := 0 to StringGrid2.RowCount - 1 do begin for j := 0 to StringGrid2.ColCount - 1 do begin StringGrid2.Cells[j,i] := ''; end; end; dt.qbusca.Active := false; dt.qbusca.SQL.Clear; dt.qbusca.SQL.Add('select codigo from ruta where tienehh = "s" and activo = "1" and modem = "n" order by codigo '); try dt.qbusca.Active := true; except dt.qbusca.SQL.Clear; dt.qbusca.SQL.Add('select codigo from ruta where tienehh = "s" and activo = "1" order by codigo '); dt.qbusca.Active := true; end; dt.qbusca.First; StringGrid2.RowCount := dt.qbusca.RecordCount; for i := 0 to dt.qbusca.RecordCount - 1 do begin StringGrid2.Cells[0,i] := dt.qbusca.fieldbyname('codigo').AsString; StringGrid2.Cells[1,i] := ''; insertarpaso(dt.qbusca.fieldbyname('codigo').AsString,'0','-','-'); dt.qbusca.Next; end; StringGrid2.Enabled := true; //creartablashh; end //no es nuevo else begin // dt.qbusca.Active := false; dt.qbusca.SQL.Clear; dt.qbusca.SQL.Add(' select * from sincronizadas '); dt.qbusca.Active := true; dt.qbusca.First; StringGrid2.RowCount := 0; primero := true; CheckListBox1.Items.Clear; CheckListBox2.Items.Clear; CheckListBox3.Items.Clear; CheckListBox4.Items.Clear; CheckListBox5.Items.Clear; CheckListBox6.Items.Clear; CheckListBox7.Items.Clear; // CheckListBox10.Items.Clear; // CheckListBox11.Items.Clear; for i := 0 to StringGrid2.RowCount - 1 do begin for j := 0 to StringGrid2.ColCount - 1 do begin StringGrid2.Cells[j,i] := ''; end; end; for i := 0 to StringGrid5.RowCount - 1 do begin for j := 0 to StringGrid5.ColCount - 1 do begin StringGrid5.Cells[j,i] := ''; end; end; StringGrid5.RowCount := dt.qbusca.RecordCount; for i := 0 to dt.qbusca.RecordCount - 1 do begin StringGrid5.Cells[0,i] := dt.qbusca.FieldByName('codruta').AsString; StringGrid5.Cells[1,i] := dt.qbusca.FieldByName('tipo_de_sinc').AsString; if dt.qbusca.FieldByName('estado').AsInteger = 0 then begin if primero then begin StringGrid2.Cells[0,StringGrid2.RowCount - 1] := dt.qbusca.FieldByName('codruta').AsString; StringGrid2.Cells[1,StringGrid2.RowCount - 1] := ''; primero := false; end else begin StringGrid2.RowCount := StringGrid2.RowCount + 1; StringGrid2.Cells[0,StringGrid2.RowCount - 1] := dt.qbusca.FieldByName('codruta').AsString; StringGrid2.Cells[1,StringGrid2.RowCount - 1] := ''; end; end else if dt.qbusca.FieldByName('estado').AsInteger = 1 then begin CheckListBox2.Items.Add(dt.qbusca.FieldByName('codruta').AsString); end else if dt.qbusca.FieldByName('estado').AsInteger = 2 then begin CheckListBox6.Items.Add(dt.qbusca.FieldByName('codruta').AsString); end else if dt.qbusca.FieldByName('estado').AsInteger = 3 then begin CheckListBox3.Items.Add(dt.qbusca.FieldByName('codruta').AsString); end else if dt.qbusca.FieldByName('estado').AsInteger = 4 then begin CheckListBox5.Items.Add(dt.qbusca.FieldByName('codruta').AsString); end else if dt.qbusca.FieldByName('estado').AsInteger = 5 then begin CheckListBox4.Items.Add(dt.qbusca.FieldByName('codruta').AsString); end else if dt.qbusca.FieldByName('estado').AsInteger = 6 then begin CheckListBox7.Items.Add(dt.qbusca.FieldByName('codruta').AsString); end else if dt.qbusca.FieldByName('estado').AsInteger = 7 then begin CheckListBox1.Items.Add(dt.qbusca.FieldByName('codruta').AsString); end; dt.qbusca.Next; end; end; dt.qbusca.Active := false; dt.qbusca.SQL.Clear; dt.qbusca.SQL.Add(' select count(r.codigo) as contador from ruta r left join sincronizadas s on r.codigo = s.codruta '); dt.qbusca.SQL.Add(' where s.codruta is null and r.tienehh = "s" and r.modem = "n" '); try dt.qbusca.Active := true; except dt.qbusca.SQL.Clear; dt.qbusca.SQL.Add(' select count(r.codigo) as contador from ruta r left join sincronizadas s on r.codigo = s.codruta '); dt.qbusca.SQL.Add(' where s.codruta is null and r.tienehh = "s" '); dt.qbusca.Active := true; end; dt.qbusca.First; verificador := dt.qbusca.FieldByName('contador').AsInteger; if verificador > 0 then begin // showmessage('13'); dt.qins.Active := false; dt.qins.SQL.Clear; dt.qins.SQL.Add(' insert into sincronizadas '); dt.qins.SQL.Add(' select r.codigo,"0","-","-" from ruta r left join sincronizadas s on r.codigo = s.codruta '); dt.qins.SQL.Add(' where s.codruta is null and r.tienehh = "s" and r.modem = "n" '); try dt.qins.ExecSQL; except dt.qins.SQL.Add(' insert into sincronizadas '); dt.qins.SQL.Add(' select r.codigo,"0","-","-" from ruta r left join sincronizadas s on r.codigo = s.codruta '); dt.qins.SQL.Add(' where s.codruta is null and r.tienehh = "s" '); dt.qins.ExecSQL; end; ShowMessage('ESTA APLICACION HA DETECTADO RUTAS NUEVAS, SE CERRARA... INGRESE NUEVAMENTE..'); Application.Terminate; end; if not Assigned(hilo0) then hilo0 := Thilo_mostrandoestados2.Create(StringGrid2,'0'); if not Assigned(hilo1) then hilo1 := Thilo_mostrandoestados.Create(CheckListBox2,'1'); if not Assigned(hilo2) then hilo2 := Thilo_mostrandoestados.Create(CheckListBox6,'2'); if not Assigned(hilo3) then hilo3 := Thilo_mostrandoestados.Create(CheckListBox3,'3'); if not Assigned(hilo4) then hilo4 := Thilo_mostrandoestados.Create(CheckListBox5,'4'); if not Assigned(hilo5) then hilo5 := Thilo_mostrandoestados.Create(CheckListBox4,'5'); if not Assigned(hilo6) then hilo6 := Thilo_mostrandoestados.Create(CheckListBox7,'6'); if not Assigned(hilo9) then hilo9 := Thilo_mostrandoestados.Create(CheckListBox1,'7'); end; |
#5
|
|||
|
|||
parte ii
constructor Thilo_mostrandoestados.Create(Box: TCheckListBox;cajon : string); begin FBox := Box; FCajon := cajon; // FreeOnTerminate := True; inherited Create(true); Priority := tpHigher; // tpNormal; end; constructor Thilo_mostrandoestados2.Create(Box: TStringGrid ;cajon : string); begin FBox := Box; FCajon := cajon; // FreeOnTerminate := True; inherited Create(true); Priority := tpHigher; end; procedure Thilo_mostrandoestados.Execute; var consulta : TQuery; // basededatos_1 : TDatabase; // session_1 : TSession; rutas,consulta2: string; k,i : integer; begin if (self) = nil then Showmessage('no asignado'); try while not Terminated do begin consulta := TQuery.create(Application); consulta.Active := false; consulta.DatabaseName := 'inase'; rutas := Form6.rutas_en_cajones(FBox.Items); if rutas <> '' then begin consulta2 := ' and codruta in (' +rutas+ ')'; end else begin consulta2 := ''; end; if consulta2 <> '' then begin consulta.SQL.Clear; consulta.SQL.Add(' select codruta,tipo_de_sinc from sincronizadas '); consulta.SQL.Add(' where estado <> '+Fcajon + ' ' + consulta2 ); consulta.Active := true; consulta.First; for k := 0 to consulta.RecordCount - 1 do begin accion := 'borrar'; codruta := consulta.FieldByName('codruta').AsString; tipo_de_sinc := consulta.FieldByName('tipo_de_sinc').AsString; Synchronize( MostrarProgreso ); Sleep(100); consulta.Next; end; end; if rutas <> '' then begin consulta2 := ' and codruta not in (' +rutas+ ')'; end else begin consulta2 := ''; end; consulta.SQL.Clear; consulta.SQL.Add(' select codruta,tipo_de_sinc from sincronizadas '); consulta.SQL.Add(' where estado = '+Fcajon + ' ' + consulta2 ); consulta.Active := true; consulta.First; for k := 0 to consulta.RecordCount - 1 do begin if FBox.Items.IndexOf(consulta.FieldByName('codruta').AsString) = -1 then begin accion := 'agregar'; codruta := consulta.FieldByName('codruta').AsString; tipo_de_sinc := consulta.FieldByName('tipo_de_sinc').AsString; Sleep(50); Synchronize( MostrarProgreso ); end; consulta.Next; end; consulta.Close; consulta.Destroy; Synchronize( MostrarProgreso2 ); Sleep(300); end; finally // consulta.Destroy; // FBox.Free; // Form6.RichEdit1.Lines.Add(' se cerro el hilo del cajon = ' + Fcajon); end; end; procedure Thilo_mostrandoestados2.Execute; var consulta : TQuery; rutas,consulta2: string; k,l,posicion : integer; begin if (self) = nil then Showmessage('no asignado'); try while not Terminated do begin consulta := TQuery.create(Application); consulta.Active := false; consulta.DatabaseName := 'inase'; rutas := Form6.rutas_en_cajones(FBox.Cols[0]); if (rutas <> ',') or (rutas <> '') then begin consulta2 := ' and codruta in (' +rutas+ ')'; end else begin consulta2 := ''; end; if consulta2 = ' and codruta in ()' then begin consulta2 := ''; end; consulta.SQL.Clear; consulta.SQL.Add(' select codruta,tipo_de_sinc from sincronizadas '); consulta.SQL.Add(' where estado <> ' + Fcajon + ' ' + consulta2 ); consulta.Active := true; consulta.First; for k := 0 to consulta.RecordCount - 1 do begin accion := 'borrar'; codruta := consulta.FieldByName('codruta').AsString; tipo_de_sinc := consulta.FieldByName('tipo_de_sinc').AsString; Synchronize( MostrarProgreso ); Sleep(50); consulta.Next; end; if rutas <> '' then begin consulta2 := ' and codruta not in (' +rutas+ ')'; end else begin consulta2 := ''; end; consulta.SQL.Clear; consulta.SQL.Add(' select codruta,tipo_de_sinc from sincronizadas '); consulta.SQL.Add(' where estado = '+Fcajon + ' ' + consulta2 ); consulta.Active := true; consulta.First; for k := 0 to consulta.RecordCount - 1 do begin if FBox.Cells[0,FBox.RowCount - 1] <> '' then begin accion := 'agregar'; codruta := consulta.FieldByName('codruta').AsString; tipo_de_sinc := consulta.FieldByName('tipo_de_sinc').AsString; Synchronize( MostrarProgreso ); Sleep(50); end; consulta.Next; end; consulta.Close; consulta.Destroy; Synchronize( MostrarProgreso2 ); Sleep(400); end; finally end; end; procedure Thilo_mostrandoestados.MostrarProgreso; begin if Terminated then exit; if mensaje <> '' then begin Form6.Memomostrarhilo.Lines.Add(mensaje + ' <=> ' + FormatDateTime('hh:nn:ss',now)); end; if accion = 'borrar' then begin FBox.Items.Delete(FBox.items.Indexof(codruta)); end; if accion = 'agregar' then begin FBox.Items.Add(codruta); end; if Form6.StringGrid5.Cols[0].IndexOf(codruta) >= 0 then begin Form6.StringGrid5.Cells[1,Form6.StringGrid5.Cols[0].IndexOf(codruta)] := tipo_de_sinc; end else begin Form6.StringGrid5.RowCount := Form6.StringGrid5.RowCount + 1; Form6.StringGrid5.Cells[0,Form6.StringGrid5.RowCount - 1] := codruta; Form6.StringGrid5.Cells[1,Form6.StringGrid5.RowCount - 1] := tipo_de_sinc; end; // FBox.Repaint; if Fcajon = '1' then Form6.aumentar(Form6.ProgressBar10); if Fcajon = '2' then Form6.aumentar(Form6.ProgressBar9); if Fcajon = '3' then Form6.aumentar(Form6.ProgressBar8); if Fcajon = '4' then Form6.aumentar(Form6.ProgressBar7); if Fcajon = '5' then Form6.aumentar(Form6.ProgressBar6); if Fcajon = '6' then Form6.aumentar(Form6.ProgressBar5); if Fcajon = '7' then Form6.aumentar(Form6.ProgressBar4); end; procedure Thilo_mostrandoestados.MostrarProgreso2; begin if Terminated then exit; if mensaje <> '' then begin Form6.Memomostrarhilo.Lines.Add(mensaje + ' <=> ' + FormatDateTime('hh:nn:ss',now)); end; // FBox.Repaint; if Fcajon = '1' then Form6.aumentar(Form6.ProgressBar10); if Fcajon = '2' then Form6.aumentar(Form6.ProgressBar9); if Fcajon = '3' then Form6.aumentar(Form6.ProgressBar8); if Fcajon = '4' then Form6.aumentar(Form6.ProgressBar7); if Fcajon = '5' then Form6.aumentar(Form6.ProgressBar6); if Fcajon = '6' then Form6.aumentar(Form6.ProgressBar5); if Fcajon = '7' then Form6.aumentar(Form6.ProgressBar4); end; procedure Thilo_mostrandoestados2.MostrarProgreso; var posicion,l : integer; begin if Terminated then exit; if mensaje <> '' then begin Form6.Memomostrarhilo.Lines.Add(mensaje + ' <=> ' + FormatDateTime('hh:nn:ss',now)); end; if accion = 'borrar' then begin posicion := FBox.Cols[0].IndexOf(codruta); for l := posicion to Form6.StringGrid2.RowCount - 1 do begin Form6.StringGrid2.Cells[0,l] := Form6.StringGrid2.Cells[0,l + 1]; Form6.StringGrid2.Cells[1,l] := Form6.StringGrid2.Cells[1,l + 1]; Form6.StringGrid2.Cells[2,l] := Form6.StringGrid2.Cells[2,l + 1]; Form6.StringGrid2.Cells[3,l] := Form6.StringGrid2.Cells[2,l + 1]; end; Form6.StringGrid2.RowCount := Form6.StringGrid2.RowCount - 1; end; if accion = 'agregar' then begin Form6.StringGrid2.RowCount := FBox.RowCount + 1; Form6.StringGrid2.Cells[0,Form6.StringGrid2.RowCount - 1] := codruta; Form6.StringGrid2.Cells[1,Form6.StringGrid2.RowCount - 1] := ''; Form6.StringGrid2.Cells[2,Form6.StringGrid2.RowCount - 1] := ''; Form6.StringGrid2.Cells[3,Form6.StringGrid2.RowCount - 1] := ''; end; if Form6.StringGrid5.Cols[0].IndexOf(codruta) >= 0 then begin Form6.StringGrid5.Cells[1,Form6.StringGrid5.Cols[0].IndexOf(codruta)] := tipo_de_sinc; end else begin Form6.StringGrid5.RowCount := Form6.StringGrid5.RowCount + 1; Form6.StringGrid5.Cells[0,Form6.StringGrid5.RowCount - 1] := codruta; Form6.StringGrid5.Cells[1,Form6.StringGrid5.RowCount - 1] := tipo_de_sinc; end; // FBox.Repaint; if Form6.ProgressBar1.Position = 499 then begin Form6.ProgressBar1.Position := 0; end; Form6.ProgressBar1.Position := Form6.ProgressBar1.Position + 1; end; procedure Thilo_mostrandoestados2.MostrarProgreso2; var posicion,l : integer; begin if Terminated then exit; if mensaje <> '' then begin Form6.Memomostrarhilo.Lines.Add(mensaje + ' <=> ' + FormatDateTime('hh:nn:ss',now)); end; // FBox.Repaint; if Form6.ProgressBar1.Position = 499 then begin Form6.ProgressBar1.Position := 0; end; Form6.ProgressBar1.Position := Form6.ProgressBar1.Position + 1; end; procedure TForm6.insertarpaso(ruta,paso,tipoproceso,agentes : string); var id_log_ipegasohh_move : string; begin dt.Qrf.Active := false; dt.Qrf.SQL.Clear; dt.Qrf.SQL.Add(' replace into sincronizadas values ("' +ruta+ '","' +paso+ '","' +tipoproceso+ '","' +agentes+ '")'); dt.Qrf.ExecSQL; if StringGrid5.Cols[0].IndexOf(ruta) >= 0 then begin StringGrid5.Cells[1,StringGrid5.Cols[0].IndexOf(ruta)] := tipoproceso; end else begin StringGrid5.RowCount := StringGrid5.RowCount + 1; StringGrid5.Cells[0,StringGrid5.RowCount - 1] := ruta; StringGrid5.Cells[1,StringGrid5.RowCount - 1] := tipoproceso; end; dt.Qrf.Active := false; dt.Qrf.SQL.Clear; dt.Qrf.SQL.Add(' insert into log_ipegasohh_move_movimientos_2 (usuario,comentario,codruta,fecha,transmision,estado,proceso) values ( '); dt.Qrf.SQL.Add('"' +Form3.Edit1.Text +'",'); dt.Qrf.SQL.Add('"N/A",'); dt.Qrf.SQL.Add('"' +ruta+ '",'); dt.Qrf.SQL.Add('"' +FormatDateTime('yyyy-mm-dd hh:nn:ss',now)+ '", '); dt.Qrf.SQL.Add('"N",'); dt.Qrf.SQL.Add('"' +paso+ '",'); dt.Qrf.SQL.Add('"' +tipoproceso+ '")'); dt.Qrf.ExecSQL end; function TForm6.rutas_en_cajones(posiciones : TStrings): string; var i : integer; resultado : string; begin resultado := ''; for i := 0 to posiciones.Count - 1 do begin resultado :=resultado + posiciones.Strings[i] + ','; end; resultado := Copy(resultado,0,length(resultado) - 1); result := resultado; end; function TForm6.aumentar(barra : TProgressBar) : boolean; begin if barra.Position = 499 then begin barra.Position := 0; end; barra.Position := barra.Position + 1; end; procedure TForm6.FormClose(Sender: TObject; var Action: TCloseAction); begin if hilo0 <> nil then begin hilo0.Terminate; hilo0.WaitFor; hilo0.Free; hilo0 := nil; end; if hilo1 <> nil then begin hilo1.Terminate; hilo1.WaitFor; hilo1.Free; hilo1 := nil; end; if hilo2 <> nil then begin hilo2.Terminate; hilo2.WaitFor; hilo2.Free; hilo2 := nil; end; if hilo3 <> nil then begin hilo3.Terminate; hilo3.WaitFor; hilo3.Free; hilo3 := nil; end; if hilo4 <> nil then begin hilo4.Terminate; hilo4.WaitFor; hilo4.Free; hilo4 := nil; end; if hilo5 <> nil then begin hilo5.Terminate; hilo5.WaitFor; hilo5.Free; hilo5 := nil; end; if hilo6 <> nil then begin hilo6.Terminate; hilo6.WaitFor; hilo6.Free; hilo6 := nil; end; if hilo9 <> nil then begin hilo9.Terminate; hilo9.WaitFor; hilo9.Free; hilo9 := nil; end; Sleep(1000); end; procedure TForm6.BitBtn1Click(Sender: TObject); begin listarrutas; PageControl1.ActivePageIndex := 0; end; end. |
#6
|
|||
|
|||
te salto el mensaje de no asignado?
|
#7
|
|||
|
|||
oye gracias... lo estaba volviendo a crear desde otro punto
![]() |
![]() |
|
|
![]() |
||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Indy y Threads | PeLuCa | Internet | 20 | 13-01-2011 00:42:21 |
Error in my_thread_global_end(): 4 threads didn't exit ??? | foetus | PHP | 2 | 26-10-2007 18:52:16 |
uso de threads | JULIPO | API de Windows | 2 | 25-07-2007 16:09:06 |
Error: Delphi 2006 + Debugger + Threads | xEsk | Varios | 0 | 16-02-2007 16:03:19 |
Threads y transacciones | anduj | Conexión con bases de datos | 5 | 12-07-2005 20:31:40 |
![]() |
|