AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Object-Pascal / Delphi-Language Delphi Restarting Main Application in TThread Class

Restarting Main Application in TThread Class

Ein Thema von FaNIX · begonnen am 1. Feb 2008 · letzter Beitrag vom 7. Feb 2008
Antwort Antwort
Muetze1
(Gast)

n/a Beiträge
 
#1

Re: Restarting Main Application in TThread Class

  Alt 1. Feb 2008, 15:09
I do not understand how this should work, because the TThread descendant belongs to your process and if application is terminated, then the process ends (and there also the thread belonging to this process, so also your thread).

And your thread runs in the same memory space as your process (better: your main VCL thread). So you can access that memory, but you have to synchronize reentrant acces due these two threads. And your statement about the application instance is not correct: on start of your process (VCL App), the application instance is created and can be referenced by the global application variable. This application instance then splits the VCL thread containing the message loop. Your thread also runs in this process and the synchronize method of TThread instances just sending a message to the message loop of VCL main thread containing an address to call from the VCL thread. Thats all about synchronizing. So, since the application variable is global, there is only one instance and so its the same as your thread can access.
  Mit Zitat antworten Zitat
Antwort Antwort

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:41 Uhr.
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