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.031 c
3-21929
@andrew
2001-12-04 11:38
2002.01.08
ВСЕМ ПРИВЕТ! Делаю некий журнал. Откуда задача....


6-22304
sedoy
2001-10-11 14:09
2002.01.08
клиент-сервер в Интернет через прокси


1-22203
T2
2001-12-16 07:07
2002.01.08
Catching the absence error msWord


1-22239
Gayrus
2001-12-17 03:52
2002.01.08
TStatusBar


6-22297
Questioner
2001-10-10 17:09
2002.01.08
Advise who that can





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 spanish 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