#2024: Changed parallel engine to use parallel.foreach instead of spawning task manually to enable more options for parallelization.