Checkpoint synchronization: Difference between revisions
m
→{{header|Oforth}}
Line 1,411:
Each task :
- Sleeps randomly between 1 and
- Then sends its number to the checkpoint using "jobs" channel.
Line 1,421:
while(true) [
System.Out "TASK " << n << " : Beginning my work..." << cr
System sleep(
jobs send($jobDone) drop
System.Out "TASK " << n << " : Finish, waiting for others..." << cr
|