IMHO the language itself might be enhanced for parallel processing.
The implementation should be done in the RTL (or supposedly rather a special library). Here the methods of distributing potentially parallel tasks on "executors" is defined. It should work according to a set of parameters (e.g. Count of available processors, a parameter list for the processors (e.g. speed), a penalty estimation for starting an "executor" (small for lightweight threads, high for cluster machines), ...) Moreover the library of course holds the code to create thread pools, assign tasks to threads, transport parameters to the thread, retrieve results from an "executor", etc.
A first implementation of course should just provide (light weight) threads (supposedly with a thread pool at least in Windows). Maybe the only primary tuning parameter being the count of CPUs. But it should be done in a way, that it can be extended to more sophisticated parameters and finally to cluster controlling, just by enhancing the library code.
IMHO, all this should not impose any problems for the implementation with "light weight threads".
-Michael _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel