Capstone C: a concurrent job runner
This part of the C# course is the third capstone: work that runs on several workers. A job and its result come first, then a bounded channel as the queue, a pool of workers that collects results and can fail, and the totals that stay stable whatever the arrival order. A clean shutdown, a log written without a race and a measurement of the pool close the part.
12.1
Capstone C: the job model
an id, the work, one at a time
Open
12.2
Capstone C: the channel queue
a bounded Channel<Job>, a producer that stops
Open
12.3
Capstone C: the workers
a pool of tasks, a result channel, a worker that fails
Open
12.4
Capstone C: results and totals
a summary, the order that is not promised
Open
12.5
Capstone C: a clean shutdown
Complete, a stop signal, waiting for every worker
Open
12.6
Capstone C: logging without a race
one logger, a channel of lines, the order of the log
Open
12.7
Capstone C: measuring the pool
five runs, one worker against four, min and median
Open