[Lazarus] Threads in Lazarus code base

Juha Manninen (gmail) juha.manninen62 at gmail.com
Fri Sep 17 11:30:34 CEST 2010


On Friday 17 September 2010 11:43:24 Michael Van Canneyt wrote:
> 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.

I committed it in r.27384.
Now I call AddOnIdleHandler before creating the form. I also tried passing 
variables through form constructor and calling AddOnIdleHandler from 
Form.OnCreate handler, like CodeBrowser does. It made no difference so I didn't 
commit it. I think CodeBrowser's secret is splitting the task and using a 
sequence state flag.

I think my solution is good enough now because the delay is typically short.
Earlier there was no visual feedback, now there is a grey form at least.

About the IDE not being thread safe. Shouldn't it be defined for each function 
separately? A function can't be called from many threads so it is not thread 
safe. It must be decided case by case. "IDE" is too broad.

Juha




More information about the Lazarus mailing list