MCPcopy Index your code
hub / github.com/ReactiveX/RxGo / newCreateIterable

Function newCreateIterable

iterable_create.go:16–32  ·  view source on GitHub ↗
(fs []Producer, opts ...Option)

Source from the content-addressed store, hash-verified

14}
15
16func newCreateIterable(fs []Producer, opts ...Option) Iterable {
17 option := parseOptions(opts...)
18 next := option.buildChannel()
19 ctx := option.buildContext(emptyContext)
20
21 go func() {
22 defer close(next)
23 for _, f := range fs {
24 f(ctx, next)
25 }
26 }()
27
28 return &createIterable{
29 opts: opts,
30 next: next,
31 }
32}
33
34func (i *createIterable) Observe(opts ...Option) <-chan Item {
35 mergedOptions := append(i.opts, opts...)

Calls 3

parseOptionsFunction · 0.85
buildChannelMethod · 0.65
buildContextMethod · 0.65