[fpc-devel] Compiler trheads (was: NoGlobals branch)
Marco van de Voort
marcov at stack.nl
Thu Aug 12 13:37:59 CEST 2010
In our previous episode, Helmut Hartl said:
> > funky thread systems.
> A single controlling thread does not scale very well. A better solution is
> that the workers choose their work by themself. Or to use some sort of
> distribution queues.
So, I'm no thread expert, but does this all really matter that much if the
units (literally) to schedule are in the tens of ms magnitude and HDD access
is required for each of them ?
The controlling thread regularly updates the queue of stuff to compile. If
it finds 10 units to compile, it can sleep( for easily 40-50ms magnitude
even), till a worker thread signals that the number of units are under the
low watermark (I'm making this up as I go, but I really don't see a
bottleneck here, with the jobs being fairly expensive)
More information about the fpc-devel