Checkpoint synchronization: Difference between revisions
Content added Content deleted
(Corrected typo.) |
m (Updated the general comment.) |
||
Line 1,954: | Line 1,954: | ||
=={{header|Nim}}== |
=={{header|Nim}}== |
||
As in Oforth, the checkpoint is a thread (the main thread) and synchronization is done using channels: |
|||
:– a channel per worker to send orders; an order may be a task number (greater or equal to one) or the stop order (equal to 0); |
:– a channel per worker to send orders; an order may be a task number (greater or equal to one) or the stop order (equal to 0); |
||
:– a channel to receive the responses from workers; workers send their identifier (number) via this channel when they have completed a task. |
:– a channel to receive the responses from workers; workers send their identifier (number) via this channel when they have completed a task. |