Collector[Input: Any #send, Output: Any #send]¶
A Collector
is the final step in the processing pipeline. The Collector
instance receives incremental results from Worker
instances and creates a running tabulation.
When a fork_join
job is finished, a finish
message will be sent to the
collector so it can take whatever steps are required to communicate the final
collected results.
Public Functions¶
collect¶
Called when results are received from a worker.
If you need to end processing early, you can call terminate
on
runner
. Otherwise, the job will continue.
Parameters¶
- runner: CollectorRunner[Input, Output] ref
- result: Output
Returns¶
- None val
finish¶
Called when all workers have reported in their results.
Returns¶
- None val