<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5861&amp;view=findpost&amp;p=66385</guid>
        <pubDate>Tue, 11 Mar 2003 18:32:29 +0000</pubDate>
        <title>Как убить поток?</title>
        <link>https://forum.sources.ru/index.php?showtopic=5861&amp;view=findpost&amp;p=66385</link>
        <description><![CDATA[Song: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>Grisha, 11.03.03, 21:29:00</span><div class='quote '>procedure TMyThread.Execute; <br>begin <br>  getauthors(); <br>  if Terminated <strong class='tag-b'>then Exit</strong>;<br> &nbsp; ....<br>end; </div></div><br><br>Это если при создании потока указывалось FreeOnTeriminate:=True<br>]]></description>
        <author>Song</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5861&amp;view=findpost&amp;p=66383</guid>
        <pubDate>Tue, 11 Mar 2003 18:29:00 +0000</pubDate>
        <title>Как убить поток?</title>
        <link>https://forum.sources.ru/index.php?showtopic=5861&amp;view=findpost&amp;p=66383</link>
        <description><![CDATA[Grisha: procedure TMyThread.Execute; <br>begin <br> &nbsp;getauthors(); <br> &nbsp;if Terminated then Exit;<br> &nbsp;gettitles(); <br> &nbsp;if Terminated then Exit;<br> &nbsp;geturls(); <br> &nbsp;if Terminated then Exit;<br> &nbsp;getdates(); <br>end;]]></description>
        <author>Grisha</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5861&amp;view=findpost&amp;p=66381</guid>
        <pubDate>Mon, 10 Mar 2003 09:45:59 +0000</pubDate>
        <title>Как убить поток?</title>
        <link>https://forum.sources.ru/index.php?showtopic=5861&amp;view=findpost&amp;p=66381</link>
        <description><![CDATA[Мыш: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;br&#62;procedure TMyThread.Execute;&#60;br&#62;begin&#60;br&#62;getauthors( );&#60;br&#62;gettitles();&#60;br&#62;geturls();&#60;br&#62;getdates();&#60;br&#62;ThreadTerminated:=true; //здесь я устанавливаю эту переменную, чтобы в основном &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;потоке не запустить поток дважды, если юзер вызовет его когда &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; он еще не завершил работу&#60;br&#62;end;&#60;br&#62;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br><br>Через Synchronize не стал делать потому что слишком медленно]]></description>
        <author>Мыш</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5861&amp;view=findpost&amp;p=66379</guid>
        <pubDate>Mon, 10 Mar 2003 06:42:41 +0000</pubDate>
        <title>Как убить поток?</title>
        <link>https://forum.sources.ru/index.php?showtopic=5861&amp;view=findpost&amp;p=66379</link>
        <description><![CDATA[Song: Как это Terminate ожидает окончания выполнения?<br>Вы, видимо, не правильно описали процедуру Execute<br>Если, например, у Вас используется обращение к основному VCL потоку через метод Synchronize, тогда при обращении к его процедуре надо писать While not Terminated Do Synchronize(@SynchronizeProc) и т.д. Вообщем ошибка Ваша. Как мимнимум нужен код процедуры Execute, чтобы решить проблему, если сами не решите.]]></description>
        <author>Song</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5861&amp;view=findpost&amp;p=66377</guid>
        <pubDate>Mon, 10 Mar 2003 00:18:06 +0000</pubDate>
        <title>Как убить поток?</title>
        <link>https://forum.sources.ru/index.php?showtopic=5861&amp;view=findpost&amp;p=66377</link>
        <description><![CDATA[Мыш: Как насильственно и сразу завершить выполнение потока? А то если пользователь выходит из программы во время его выполнения, возникают ошибки, &nbsp;free и destroy тоже выдают ошибки, а terminate дожидается окончания выполнения]]></description>
        <author>Мыш</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      </channel>
      </rss>
	