while (!convergence)
 for (i=0; i<N; i++)
  task1(i, convergence, ); // convergence is updated in task0
Listing 18: Example C-code of convergence algorithm.