Synchronous concurrency: Difference between revisions
requires concurrency
(→{{header|PureBasic}}: Added PureBasic) |
(requires concurrency) |
||
Line 1:
{{task|Concurrency}}[[requires::Capability:Concurrency| ]]
One of the concurrent units will read from a file named "input.txt" and send the contents of that file, one line at a time, to the other concurrent unit, which will print the line it receives to standard output. The printing unit must count the number of lines it prints. After the concurrent unit reading the file sends its last line to the printing unit, the reading unit will request the number of lines printed by the printing unit. The reading unit will then print the number of lines printed by the printing unit.
|