-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fill with Next(value) event with interval. #123
Comments
How can it fill it, if there is no value being sent? Could you put an example of the behaviour you would expect from this operator? |
I was thinking something like this: // Let's suppose valueProperty is MutableProperty<String?>
SomeUnstableService.valueProperty.producer.fillWithNext(.Next("N/A"), timeInterval: 5.0, scheduler: QueueScheduler.mainQueueScheduler).startWithNext {
stringValue in
print(stringValue)
} While the service is setting the func onDataReceived(value: String){
self.valueProperty.value = value
} But when more than |
I think you would be able to achieve that with a |
Could you give me a hint on this? I've tried but I cannot accomplish the behavior 😞 |
Thought a bit more about this and I don't think it's possible, so disregard my initial comment. Regarding the new operator:
|
1.- That's the way, as it should be type |
Thinking abstractly, this sounds like a "decay" model that you're trying to respond to. In those terms, creating a |
The summary of this operator is that given a stream of values at least |
I understand that. My point about |
I have no counter arguments with that operator naming! |
I use
MutableProperty
to fill values coming through a Bluetooth protocol, and them being represented at real-time in different sections of the application.I was thinking (and maybe it could be useful to add in this library) a method which fills a producer or signal with
.Next(value)
events eachtime the original producer or signal doesn't send any value for aNSTimeInterval
. Using theDateSchedulerType
shouldn't be hard to achieve this behavior.When the signal or the producer sends again a value, the "Default" event is replaced inmediately and the countdown starts again.
What do you think?
The text was updated successfully, but these errors were encountered: