Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Wo wird Thread freigegeben? (https://www.delphipraxis.net/130339-wo-wird-thread-freigegeben.html)

Muetze1 6. Mär 2009 20:40

Re: Wo wird Thread freigegeben?
 
Zitat:

Zitat von DJ-SPM
Vielen Dank für die Erklärung. Wusste nicht, dass der Thread die Execute-Methode trotzdem bis zum Schluss ausführt! Danke

Deshalb sollte die Execute Methode immer eine Abbruchbedingung enthalten, welche auf Terminated prüft. Dies ist das Flag, was Terminate setzt (einzige Aktion der Methode). Es wird immer gewartet bis die Execute Methode verlassen wurde. Das Beispiel in der Hilfe zeigt deshalb auch eine "while not Terminated do" Schleife in der Execute Methode.


Alle Zeitangaben in WEZ +1. Es ist jetzt 11:22 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz