[Lazarus] Multi-threading support in IDE

Vincent Snijders vsnijders at vodafonevast.nl
Thu Aug 13 13:27:26 CEST 2009


Graeme Geldenhuys schreef:
> Marc Weustink wrote:
>>
>> Don't know about the others, but compiling is done by a separate 
>> process, so there is a chance that your os runs it in a different core.
> 
> That's not the same as running it in a separate thread though - is it?
> 
> Quoted from a Posix Thread tutorial I found on the internet.
>   http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html
> 
> "Threads require less overhead than "forking" or spawning a new process 
> because the system does not initialize a new system virtual memory space 
> and environment for the process."
> 
> 
> So wouldn't it be more efficient to create a new thread for the compiler 
> instead of a new process?

Yes, it is more efficient. The fp ide also doesn't create a new process.

The disadvantage of using the same process is that the coupling is much 
tighter: No easy switching between compiler versions, and crashing the 
compiler crashes the IDE.

Vincent




More information about the Lazarus mailing list