Skip to content

How cancel subscription ? #401

Open
Open
@rullyalves

Description

@rullyalves

I would like to add subscribers and unsubscribe something like create a subscription and be able to unsubscribe the specific subscription without breaking the observable completely

	ch := make(chan rxgo.Item)
	obs := rxgo.FromChannel(ch, rxgo.WithPublishStrategy())
        obs.Connect()
        newObs := obs.Map(func(ctx context.Context, i interface{}) (interface{}, error) {
		return i.(int) * 2, nil
	})
	
	dispose := newObs.DoOnNext(func(i interface{}) {
		fmt.Println(i)
	})
	
	dispose()

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion regarding how RxGo is working etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions