Jacobi Example Using Structured Dagger
jacobi.ci
 array[1D] Ar1 {

entry void GetMessages (MyMsg *msg) {
    when rightmsgEntry(MyMsg *right), leftmsgEntry(MyMsg *left) {
         atomic { CkPrintf(“Got both left and right messages \n”);
                        doWork(right, left); }
     }
};
entry void rightmsgEntry(MyMsg *m);
entry void leftmsgEntry(MyMsg *m);

};