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?