Repository navigation
Conversation
triandco
commented
Sep 7, 2023
- Implemented a variant of a subject that "replays" old values to new subscribers by emitting them when they first subscribe
- Added two new test cases based on RxJs
| // TODO: How should I be yielding here so that obv1.Notifications is populated? | ||
| // (I specifically don't want to emit a completion.) | ||
| do! Async.Sleep 1_000 |
There was a problem hiding this comment.
@dbrattli is there a better way to ensure the value is yielded without using Async.Sleep?
There was a problem hiding this comment.
I'll have a look, but currently on vacation so might take a few days 😬
Codecov Report
@@ Coverage Diff @@
## main #10 +/- ##
==========================================
+ Coverage 47.63% 50.67% +3.03%
==========================================
Files 14 14
Lines 1100 1188 +88
Branches 44 46 +2
==========================================
+ Hits 524 602 +78
- Misses 564 572 +8
- Partials 12 14 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Thank you, @triandco, for proposing Replay Subject and for the work you put into this PR. It gave us the starting point for the feature. I've adapted it to the current Fable.Reactive and Fable.Actor APIs in #50, including bounded FIFO replay, late completion and error delivery, and subscription disposal. Your question about avoiding I'm closing this PR in favor of #50 so further review can happen in one place. Thanks again for getting this started! |
Adapt the replay subject proposed in #10 to the current actor-owned subject API. Preserve bounded FIFO replay and terminal notifications for late subscribers, and cover delivery without fixed sleeps. Original proposal: triandco/AsyncRx#10