Micha Nelissen ha scritto:
Giuliano Colla wrote:
However making Lazarus LCL thread safe can be a lot of work, but would
be an enormous bonus which would enable to use it in all fields where a
real efficient thread support is needed and currently you have no RAD
tools.
Multi-thread safe LCL would also mean locking, and that means slowdown
also when you don't need it. 'real efficient' is therefore a *very*
*Very* simplistic view of the situation.
Locking is the easy hacking way. Is basically the reverse of what it's
done now with the blocking mechanism of synchronize. You don't block the
main thread, but rather the working thread.
Making LCL thread safe mean to separate the logical handling of what has
to be done, from the physical handling of writing to the screen. If it's
well implemented it can be faster than now even for applications which
don't need multithreading.
If you think, any web browser is multithreaded, thread safe, and fills
up your screen faster than Lazarus.
Besides, the GUI thread is meant to be mostly idle; so that it can
respond to user's action quickly. You have to synchronize your
background tasks anyway if you run them, and want to stop them; so
multi-thread safety doesn't gain much on this point.
The reaction to *user* action is quick (mouse and keyboard), the
reaction to events coming from outside is far from satisfactory.
My personal opinion it's only nice for QuickSort vs. Bubble Sort demoes.
Ever thought of applications which receive data from a number of
external sources and should display them and react accordingly? They
outnumber the applications where a user just sits there and plays with
mouse. And they're commercial application which need a good solid
software, and a pleasant look. I'm talking of application where the
input devices are a combination of network connection plus barcode
readers, badge readers, electronic scales, access controls, etc. etc.
You find them in POS, in hotels, in company stores, in cash dispensers,
in taxi companies, in airports, wherever. The multiple sources require
multithreading, and fast response to external events, combined with fast
update of display, and with human interaction.
There's no RAD worth mentioning today to provide the GUI for all those
applications.
Giuliano
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives