reactive-async icon indicating copy to clipboard operation
reactive-async copied to clipboard

Check monotonicity of whenNext callback

Open JanKoelzer opened this issue 7 years ago • 1 comments

For whenNext without threshold, results must always increase, if input increases. This has to be checked at runtime. Use a table to store previous inputs/outputs. Use #86 on a new result every and every entry to check this property.

JanKoelzer avatar Jan 29 '18 13:01 JanKoelzer

This can easily be added to NextDepRunnable but is hard to check, if a callback is used for both whenNext and whenComplete:

val f = …
c1.whenNext(c2, f)
c1.whenComplete(c2, f) // same callback here

Maybe we could disapprove this usage in favor of when and implement the check in the implementation of when. All callback results would need to be stored in a cell's state Map[otherCell, Map[inV, outcome]]. On the other hand, check, if this feature is needed anymore, if we use a MonotonicUpdater.

JanKoelzer avatar Mar 09 '18 13:03 JanKoelzer