Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

kill tThread Find similar branches


neo_   (2001-12-18 12:33) [0]

Подскажите, плиз, как можно, находясь в основном потоке приложения, определить сушествует ли параллельный поток и, если да, то грамотно завершить его.
Thank you.



Digitman   (2001-12-18 13:10) [1]

пример, ставший классикой :


type

TMyThread = class(TThread)
protected
procedure Execute; override;
end;

var
MyThread; TMyThread;

implementation

procedure TMyThread.Execute;
begin
while not Terminated do begin
.......
end;
end;

...
MyThread:= TMyThread.Create(..); создание и старт потока
...
MyThread.Free; // "убийство" потока





Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top









Memory: 0.81 MB
Time: 0.027 c
14-22337
Alexander
2001-11-05 13:20
2002.01.08
Print Server DP-101 (D-Link) and printing from under DOS


14-22416
Nemesis
2001-11-14 11:47
2002.01.08
Need a program of this type


1-22227
Tosov
2001-12-15 10:43
2002.01.08
Как работать с TInplaceEdit


7-22444
VS
2001-09-27 07:14
2002.01.08
How to copy yourself if the program is running


1-22167
based on
2001-12-15 20:56
2002.01.08
Such is the problem !!!





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish