Skip to content

Collector[Input: Any #send, Output: Any #send]

[Source]

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.

interface ref Collector[Input: Any #send, Output: Any #send]

Public Functions

collect

[Source]

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.

fun ref collect(
  runner: CollectorRunner[Input, Output] ref,
  result: Output)
: None val

Parameters

Returns


finish

[Source]

Called when all workers have reported in their results.

fun ref finish()
: None val

Returns