Checkpoint synchronization: Difference between revisions

Content added Content deleted
Line 1,405: Line 1,405:
Checkpoint is implemented as a task. It :
Checkpoint is implemented as a task. It :


- Receives n "allDone" events from n tasks into a "jobs" channel.
- Receives n "jobDone" events from n tasks into a "jobs" channel.


- Then sends $done event to all tasks so they can work again.
- Then sends $allDone event to all tasks so they can work again.


Each task :
Each task :
Line 1,415: Line 1,415:
- Then sends "jobDone" to the checkpoint using "jobs" channel.
- Then sends "jobDone" to the checkpoint using "jobs" channel.


- And waits for checkpoint return on its personal channel.
- And waits for $allDone checkpoint return on its personal channel.


<lang Oforth>func: task(n, jobs, myChannel)
<lang Oforth>func: task(n, jobs, myChannel)