[Lazarus] Multithreading on Linux/OSX/Win32

Brad Campbell brad at wasp.net.au
Fri May 29 17:54:40 CEST 2009


Luca Olivetti wrote:
> En/na Brad Campbell ha escrit:
> 
>>
>> This has had a very unexpectedly pleasant side-effect of not killing 
>> the application when I dereference a null pointer in the compiler. The 
>> compiler thread crashes and the application keeps on keeping on. I 
>> only just noticed this and I think it's fab, *but* (and there is 
>> always a but).
> 
> It's not really fabulous: if you have a long running thread but you 
> forget to catch any exception, it will simply die and the main 
> application won't notice.

In my application I have a signal that each thread sends at least once a second. If the main thread 
sees no signal for 10 seconds it assumes the child has crashed and notifies the user. None of my 
threads run longer than 10 seconds anyway, but updating progress bars and captions when it was all 
in one thread was enough to throw out sensitive serial timing.

 From my perspective it's nice to be able to notify the user that the compiler has crashed and they 
should save their work before restarting the application.

Brad
-- 
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.




More information about the Lazarus mailing list