elizarov
10/25/2017, 9:42 AMnext
invocation, the producer is suspended until somebody invokes receive
. The one less important difference is that produce
is slightly less lazy, because it first computes the value, then tries to send it (and may suspend), while with buildSequence
it is never computed unless requested by next
.