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) _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel