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