Checkpoint synchronization: Difference between revisions
Content added Content deleted
Line 1,422: | Line 1,422: | ||
System.Out "TASK " << n << " : Beginning my work..." << cr |
System.Out "TASK " << n << " : Beginning my work..." << cr |
||
System sleep(n 100 * rand) |
System sleep(n 100 * rand) |
||
jobs send( |
jobs send($jobDone) drop |
||
System.Out "TASK " << n << " : Finish, waiting for others..." << cr |
System.Out "TASK " << n << " : Finish, waiting for others..." << cr |
||
myChannel receive drop |
myChannel receive drop |
||
Line 1,433: | Line 1,433: | ||
#[ jobs receive drop ] times(n) |
#[ jobs receive drop ] times(n) |
||
"CHECKPOINT : All jobs done, sending done to all tasks" println |
"CHECKPOINT : All jobs done, sending done to all tasks" println |
||
channels apply(#[ send($ |
channels apply(#[ send($allDone) drop ]) |
||
] |
] |
||
} |
} |