On 26.10.2016 12:02, LacaK via Lazarus wrote:

 you just could use TTimer.
probably yes. I do not remember why I have used thread for it. May be I do not wanted dependency on ExtCtrls ... Btw. when TTimer is executing OnTimer method, which does not finishes until next Interval is elapsed, is again called OnTimer ? Or next OnTimer is performed only when prior OnTimer finished ?

Using a "Worker" Thread makes sense when
- long winding stuff (calculations, file search, database, ...) are done in the Thread and the GUI is supposed to go on working during that time - you want to take advantage of multiple cores working in parallel (e.g. for number crunching) - you want to wait for external events in a blocking OS Call (e.g. Socket).

I would avoid using Threads if not decently justified, as a lot complexity is added.

-Michael
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to