[Lazarus] Threads in Lazarus code base
Michael Van Canneyt
michael at freepascal.org
Wed Sep 15 11:17:16 CEST 2010
On Wed, 15 Sep 2010, Juha Manninen (gmail) wrote:
> On Wednesday 15 September 2010 11:48:09 Michael Van Canneyt wrote:
>> Threads are a thing of the past as well. I've been programming threads
>> since years. There is nothing exciting about them, mostly they are a pain.
>
> Correct but now there is no better way to implement parallelism. I know some
> languages have new syntax for it which is actually exciting. Maybe some day
> FPC will support such syntax but that is future. Now is now.
Well...
IMHO the whole threading model is basically flawed, but currently there is
no other alternative. At least not in any language I know.
>> Programming threads is error-prone, and needs careful design of your
>> classes. I doubt that the lazarus IDE is very thread-safe, and therefor I
>> think that the lazarus devels do not enable threading by default.
>>
>> This is also why the UseCThreads is there. There is no need to drag in
>> thread support if you don't use it: it creates additional dependencies
>> which you simply don't need if you don't program using threads.
>
> Yes but now I want to use it. I don't care if other parts of the IDE are
> "thread-safe". My thread is running only when the user is reading one settings
> dialog and it is done in a safe way. It simply makes the program better.
>
> What would you suggest? How to commit the code so that we don't get complaints
> about RunErrors?
This is a question the lazarus devels must answer. I just provided a possible
hypothesis why currently they don't use it :-)
Michael.
More information about the Lazarus
mailing list