[Lazarus] Threads in Lazarus code base

Michael Van Canneyt michael at freepascal.org
Fri Sep 17 10:43:24 CEST 2010



On Fri, 17 Sep 2010, Juha Manninen (gmail) wrote:

>
> I honestly wonder the attitude against threads here. I hear comments of Pascal
> being a dying language from the past. Maybe it is true after all.
> How can one take seriously a developer community which claims threading is
> inherently wrong and bad?

The community doesn't claim so. 
It is the result of independent research on the subject.

You must separate 'parallel computing' and 'threads'. 
Threads are one way of implementing parallel computing.

Note that the community doesn't say that parallel computing is bad; of
course not; The opinion (of some, obviously) is simply that threads are 
not the best way of accomplishing parallel computing.

>
> BTW, TThread class has a good and intuitive interface, IMO. A new language
> syntax for parallelism would be nice but it wouldn't make any fundamental
> difference. Start a thread and call WaitFor later. How much easier can it be?

No-one said that it was not easy to program threads. 
I use them myself extensively.

But the possible side effects were pointed out, and the consequences that usage 
of threads has IN THE IDE. And the opinion was raised that if there is a way 
to accomplishing the same task with our without using threads, then "no
threads" is preferred for the IDE. This does not mean that a threading way 
will be rejected; you'll just need to argue the need for threads a bit more.

I understand that it may be harder and less easy for your particular task.
Maybe you can submit your work so the IDE experts can offer better and more 
responsive ways of doing the task.

Michael.




More information about the Lazarus mailing list