Comments (2)
Thank you very much. Finally it works as expected at least for me :-)
from entwine.
Hi @sherlock1982,
Yes, that's because RxJava and other implementations use referenceCounted()
instead of autoconnect()
in their share(replay:)
implementations.
With a referenceCounted()
operator there is no need for additional logic in ReplaySubject
and therefore any subject that wants to provide this kind of functionality is able to.
I was unsure whether or not Combine had a method of recreating the behaviour of the refCount()
operator and after further investigation it appears it does not.
So, in the meantime I've added a new referenceCounted()
operator specifically for Multicast publishers. (Ideally it would work for all ConnectablePublishers but the protocol doesn't provide the necessary API for the task.)
Currently available on the master brach.
from entwine.
Related Issues (15)
- ReplaySubject inconsistent behavior ? HOT 7
- Entwine doesn't appear to be happy with Xcode 11.2/Swift 5.1 HOT 5
- TestablePublisher failed after receiving subscriptions . HOT 2
- Feature request: proper switchToLatest and switchMap operators workaround
- Unable to create `TestScheduler.Configuration` HOT 4
- Test Publishers.CollectByTime with TestScheduler HOT 17
- Testing a publisher on main thread seems to break test HOT 1
- Unexpected behaviour/result from TestableSubscriber HOT 2
- `swift test` failing out of the box with the repo on Mojave HOT 1
- Could not find module 'Entwine' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator HOT 12
- Add toBlocking operator like RxSwift HOT 1
- consider changing TestSubscriber.sequence to something else HOT 3
- using EntwineTest to compare results when the underlying type is a tuple - kind of awkward HOT 3
- Subject protocol updated in beta5 - replaySubject doesn't currently conform HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from entwine.