This page demonstrates parallel for loops with no communication.
The TBC code is as follows.
parFor( count,
(i : Int) -> {
var ball = balls[i] ;
var t = 0 ;
loop( pause( 60 ) >
exec( () -> {
t = t + 60 ;
var x = 250-10 + 100 * Math.cos( t / (512+4*i) ) ;
ball.css( "left", x ) ;
}
)
) ;
}
) ;
The haxe code is here.