Conversation
| printOnFallback: Boolean = false): Stream[T] = { | ||
| var defaultValueIsFresh = true | ||
|
|
||
| val cancel1 = fallBack.foreach(_ => defaultValueIsFresh = false) |
There was a problem hiding this comment.
As soon as this method returns, these variables are no longer needed and may be cleaned up. You should probably create a new class for a fallback stream that stores these listeners.
This is super janky, but will be fixed with the new stream tracking mechanism, which I hope to PRify this week.
There was a problem hiding this comment.
Wait, but they are needed though. It's to make sure that the foreach stuff is never cancelled
There was a problem hiding this comment.
I mean from the JVM perspective, those variables are not depended on by anyone and so would be cleaned out.
There was a problem hiding this comment.
Would that mean that this line in the code for creating events
will break?
Codecov Report
@@ Coverage Diff @@
## master #136 +/- ##
==========================================
- Coverage 64.92% 64.44% -0.49%
==========================================
Files 68 68
Lines 1340 1350 +10
Branches 131 129 -2
==========================================
Hits 870 870
- Misses 470 480 +10
Continue to review full report at Codecov.
|
|
@paxelord do we want to move forward with this PR or just drop and replace with the simpler approach we discussed? |
No description provided.