New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Operators for binding Disposable
to a Lifetime
.
#421
Comments
Moving I'll keep this in mind when I review #404 and then we can discuss more. We should definitely do something to improve things if we're going to be merge that PR. |
Coming from https://github.com/Carthage/ReactiveTask/pull/97/files#r125483012 and 👍 for some sort of operator or something like |
I'm on board with an operator. This suggestion from @andersio seems like it might make sense: disposable <~ lifetime |
This will be difficult to read / understand and will not be natural: stderrAggregated
.then(stdoutAggregated)
.map(TaskEvent.success)
.start(observer) <~ lifetime The following (placing a lifetime on LHS) is preferable for me (as a natural replacement of lifetime <~ stderrAggregated
.then(stdoutAggregated)
.map(TaskEvent.success)
.start(observer) |
The problem is that the inconsistent direction. |
Okay:
Maybe we should go back to |
I'm pretty happy with |
Is there any reason it couldn't be I also think |
Implemented in #482. |
In #334, we replaced
CompositeDisposable
withLifetime
for collecting cleanup callbacks in producers, and+=
is also deprecated. So for now adding aDisposable
toLifetime
has to be written as:If #404 is to be merged, the lack of an operator causes it even nastier for
Signal
s.It makes me wonder if we can reintroduce an operator shorthand, but instead of
+=
we would reuse<~
.This makes sense if we treat
Disposable
as a binding target of()
. But on the other hand the LHS/RHS of the operator has to be swapped as compared to+=
.The text was updated successfully, but these errors were encountered: