-
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
coreChanges affecting the core logic or main components of the project, in root/internal/testing pkgChanges affecting the core logic or main components of the project, in root/internal/testing pkgdiscussionGeneral discussion, proposal, or open-ended topic not tied to a specific bug.General discussion, proposal, or open-ended topic not tied to a specific bug.
Description
And add UnsubscribeWithContext(context.Context) method to ro.Subscription interface.
func MyOperator[T any]() func(Observable[T]) Observable[[]T] {
return func(source Observable[T]) Observable[[]T] {
return NewUnsafeObservableWithContext(func(subscriberCtx context.Context, destination Observer[[]T]) Teardown {
sub := source.SubscribeWithContext(
subscriberCtx,
NewObserverWithContext(
...
),
)
return func(unsubscriberCtx context.Context) {
sub.UnsubscribeWithContext(unsubscriberCtx)
}
})
}
}Don't forget to update documentation:
- hacking
- contributing
Metadata
Metadata
Assignees
Labels
coreChanges affecting the core logic or main components of the project, in root/internal/testing pkgChanges affecting the core logic or main components of the project, in root/internal/testing pkgdiscussionGeneral discussion, proposal, or open-ended topic not tied to a specific bug.General discussion, proposal, or open-ended topic not tied to a specific bug.