/* * Example HJ program with DataDrivenFuture's. * This program does not have any useful parallelism because the await clauses effectively serialize all async's. */ import hj.lang.DataDrivenFuture; public class DDFEx { public static void main(String[] args) { int n = 5; DataDrivenFuture[] A = new DataDrivenFuture[n]; for(int i=0; i=1; i--) { System.out.println("Creating async " + i); async await(A[i-1]) { System.out.println("Running async " + i); System.out.println("Putting " + i); A[i].put(""); } // async } System.out.println("Putting 0"); A[0].put(""); } }