Autor Beitrag
Terminator
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34


D6 Prof
BeitragVerfasst: Mo 08.08.05 13:13 
Hallo Zusammen,
wie kann ich den rausfinden wann mein Thread durchgelaufen ist.
Bzw. Ich hab mehrere Thead gleichzeitig laufen und möchte wissen wann der letzte Thread fertig ist.
Wie könnte ich das denn realisieren ?

_________________
Man muss nicht alles glauben, was stimmt!
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 08.08.05 13:40 
Entweder Suche im MSDN WAITFORMULTIPLEOBJECTS oder man nimmt die Eigenschaft WaitFor von der TThreadklasse, wenn du sie denn benutzt.
Terminator Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34


D6 Prof
BeitragVerfasst: Mo 08.08.05 14:22 
Hallo ich glaube ´du hast mir mit WaitFor den richtigen Tipp gegeben, aber ich versteh die Umsetzung nicht. Ich hab ne for Loop und möchte wissen wann der letzte THread der im Loop gestartet wurde zu Ende ist.

Wie mach ich das dann ? DANKE für die Hilfe

_________________
Man muss nicht alles glauben, was stimmt!
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Mo 08.08.05 14:56 
vielleicht hilft dir das weiter:

GetExitCodeThread

ausblenden Quelltext
1:
If the specified thread has not terminated, the termination status returned is STILL_ACTIVE. If the thread has terminated, the termination status returned may be one of the following:					


msdn.microsoft.com/l...etexitcodethread.asp

obwohl mir aufgefallen ist das in deinem fall WaitFor (mit parameter INFINITE, bzw while schleife) besser ist da du dann keine extra schleife amchen musst die jedesmal schaut ob alle threads beendet sind

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit