Einzelnen Beitrag anzeigen

Benutzerbild von Captnemo
Captnemo

Registriert seit: 27. Jan 2003
Ort: Bodenwerder
1.126 Beiträge
 
Delphi XE4 Architect
 
#29

AW: Absturz der Anwendung nach beenden eines Threads

  Alt 20. Jun 2014, 10:00
Grad gefunden:

Zitat:
To have the TTimer.OnTimer event be triggered in the context of the worker thread, you have to instantiate the TTimer inside the thread's Execute() method instead. But that has another set of pitfalls. TTimer creates a hidden window using AllocateHWnd(), which is not thread-safe and cannot safely be used outside the context of the main thread. Also, TTimer requires the creating thread context to have an active message loop, which your thread does not.
Quelle: http://stackoverflow.com/questions/1...d-generates-av



Gibt's nen Timer der Threadsafe ist?

Ist der JvThreadTimer Theadsafe?
Zitat:
This component is a replacement for the TTimer component with a better accuracy (1 millisecond) and without consuming a window handle for the timer. TJvThreadTimer uses an internal thread instead of the Windows API timer functions, and can have an accuracy of a millisecond, but it will consume more CPU than a TTimer.
http://wiki.delphi-jedi.org/wiki/JVC...TJvThreadTimer
Versteh ich das richtig?
Dieter
9 von 10 Stimmen in meinem Kopf sagen ich bin nicht verrückt. Die 10. summt dazu die Melodie von Supermario Bros.
MfG Captnemo

Geändert von Captnemo (20. Jun 2014 um 10:03 Uhr)
  Mit Zitat antworten Zitat