Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 659 Bytes

Generator.md

File metadata and controls

15 lines (9 loc) · 659 Bytes

Generator

A generator is a method that returns a channel. The one below creates a channel and writes a given number of messages asynchronously from a separate thread.

By returning a ChannelReader we ensure that our consumers won't be able to attempt writing to it.

That's how we use the generator.

Next: Multiplexer » Previous: Channels «