Well, there's a subtle difference between "parallel" and "async": whilst the 
for-loop may run in parallel, once you got to the statement after it, all iterations are finished. 
The same is not true for an async(hronous) procedure.
Very good point !!! !

That is why the "parallel" keyword should be reserved for loops (that internally run in parallel) and not be used for stuff that runs asynchronous (in parallel to something external to that scope).

This is why the "async" and/or "future" keywords are much more appropriate for procedures to run in the background. (Which might be the easiest paradigm to implement.)

OTHO this also points out that "parallel loops" are by far the easiest to used, as you don't need to care of any synchronizing outside of the loop.

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

Reply via email to