[Lazarus] Threads in Lazarus code base

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Sep 15 13:50:29 CEST 2010


On Wed, 15 Sep 2010 12:30:29 +0100
Henry Vermaak <henry.vermaak at gmail.com> wrote:

> On 15 September 2010 12:09, Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:
> > On 15 September 2010 13:07, Michael Schnell wrote:
> >>
> >> I suppose the GUI will not  react while the task you run in "OnIdle" is
> >> busy. So you will need to split your add-on in tiny pieces and run one after
> >> the other in subsequent "OnIdle" callbacks.
> >
> > Or use a thread and make the code simpler! :)
> 
> And more error prone, and open to races and deadlocks, and harder to
> debug.  Imho, using threads are for serious work and code that needs
> to take advantage of extra cores/processors.

+1

Mattias




More information about the Lazarus mailing list