Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 637 Bytes

defer.md

File metadata and controls

35 lines (23 loc) · 637 Bytes

Defer Operator

Overview

do not create the Observable until the observer subscribes, and create a fresh Observable for each observer.

Example

observable := rxgo.Defer([]rxgo.Producer{func(ctx context.Context, next chan<- rxgo.Item) {
	next <- rxgo.Of(1)
	next <- rxgo.Of(2)
	next <- rxgo.Of(3)
}})

Output:

1
2
3

Options