[Lazarus] Package lazwebextra 0.9 failed to compile

Marcos Douglas md at delfire.net
Wed Sep 15 15:48:51 CEST 2010


On 15 September 2010 13:25, Mattias Gaertner  wrote:
>
> True. And I have already plans to use some threads.

Good to hear.


> Threads have several disadvantages:
> *They are harder to debug,

debugging with FPC+GDB is already hard, so there would be no difference.  ;-)


> *it is harder to follow the program flow,

Same can be said for any event-based applications. Change a property
here, and other things might execute elsewhere. Or if Lazarus
debugging was extended (like MSEide can do), then you can monitor the
value at a memory address for changes, and if a change occurs, a
breakpoint is triggered - at which point you can call up the call
stack to see what code changed that value. This feature is called
"watchpoints", and it works brilliantly in MSEide.


> *you have to program carefully to avoid dead lock and non exclusive
> access, which is especially hard where design time packages extends
> the code base,

Try and use the TMultiReadExclusiveWriteSynchronizer instead. At least
you will not block threads that only want to do reading (which seem to
be most of the IDE task you mentioned with the OnIdle comment).


> *many IDE parts will become slower (once you start a thread the RTL
> uses critical sections and especially string handling become much
> slower).

See previous point.



-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/




More information about the Lazarus mailing list