Generator[A: Any #send]¶
A Generator
creates data on demand which will be sent to various
Worker
instances where the data will be processed.
Public Functions¶
init¶
Called before the first time the generator is called. Allows the generator to distribute work based on the number of workers available.
Parameters¶
- workers: USize val
Returns¶
- None val
apply¶
Called each time a worker needs data.
If no additional data is available, error
should be returned.
Returns¶
- A^ ?