You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
disposed, cancel:=observable.Connect()
gofunc() {
// Do somethingtime.Sleep(time.Second)
// Then cancel the subscriptioncancel()
}()
// Wait for the subscription to be disposed<-disposed
But now, connect takes a context. The API has changed and it should be something like this
ctx, cancelFunc:=observable.Connect(context.Background())
gofunc() {
// Do somethingtime.Sleep(time.Second)
// Then cancel the subscriptioncancelFunc()
}()
// Wait for the subscription to be disposed<-ctx.Done()
The text was updated successfully, but these errors were encountered:
https://github.com/ReactiveX/RxGo#connectable-observable
The documentation shows the following
But now, connect takes a context. The API has changed and it should be something like this
The text was updated successfully, but these errors were encountered: