Marco van de Voort schrieb:
In our previous episode, Hans-Peter Diettrich said:
How would you count an level, when multiple concurrent parser threads create further threads concurrently?

Hmm, I think a producer/consumer system with a queue for modules that can be
compiled and N worker threads (specifiable by user)

Your suggestion doesn't solve the problem of level counting, where in fact only the first level (main module, started from the commandline) is of interest, the exact "depth" of other module processing is of no interest.

The observed problem is not the counting itself, but the exact point in the workflow, when the compiler should go back into level one (or zero) state, indicating "generate final binary for the main module". This is not clear from the given code, and led to strange errors in my first test.

Furthermore we should consider to handle multiple main modules (projects), that can be built in one go - since they are all based on the same RTL and other standard units, that deserve loading/compiling only once. That's why we IMO have to figure out, what special "final" mode should be entered, for every main module, at which point in the workflow, and what should happen when that point is reached.

DoDi

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to