Skip to content

Glitch-free updates #272

Description

@raimohanska

A glitch in FRP is a temporary violation of an invariant.

For instance, if you use Bacon.js 0.6.x and run this

a = Bacon.sequentially(10, [1, 2])
b = a.map((x) -> x * 2)
c = Bacon.combineAsArray([a, b])
c.log()

You'll get

[ 1, 2 ]
[ 2, 2 ]
[ 2, 4 ]

where the pair [2,2] is a glitch that occurs because c is updated first by the changed value of a and the the changed value of b. In glitch-free FRP you should get just

[ 1, 2 ]
[ 2, 4 ]

In the feature/dependency-graph-dispatch I'm working on an improved event dispatching mechanism that depends on a dependency-tree to guarantee glitch-free updates. This will improve the reliability of all the combine* methods as well as sampledBy and takeUntil.

I'm planning to release version 0.7.0 with this new dispatch mechanism. Currently, it's still work-in-progress and I'd be very glad to get comments and/or pull requests to get more test coverage and fix possible bugs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions