Closed
Description
Quoting from an email by @headinthebox, to make sure we don't forget about this issue:
Another bug in RxJava/Scala
When you create a new subscription it does not remember that is is already disposed
In scala (using trivial companion object)
Val s = Subscription{ println(“hi”) }
s.unsubscribe()
s.unsubscribe()prints “hi” twice, in .NET only once.
In the course I will tell the students it prints only once
The issue is already present in Java:
public static void main(String[] args) {
Subscription s = Subscriptions.create(new Action0() {
public void call() {
System.out.println("hi");
}
});
s.unsubscribe();
s.unsubscribe();
}
also prints "hi" twice.
Let's fix this first in Java, and then add a companion object Subscription
to RxScala.
Metadata
Metadata
Assignees
Labels
No labels