Skip to content
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

Pull / Lazy signals support #103

Open
sirinath opened this issue Jun 22, 2016 · 1 comment
Open

Pull / Lazy signals support #103

sirinath opened this issue Jun 22, 2016 · 1 comment

Comments

@sirinath
Copy link

There are times when on value updates we do not want to compute everything unless there is consumer for the value.

So is it possible to add push / pull model. E.g.

x = Signal(0)
push!(x, 1)

y = pull(x)
z = foldp(+, 0, y)
value(z)

z is updated only when needed. Assume z is a very expensive calculation.

Also,

x = mapLazy(a -> a + 1)
value(x)

and

x = foldLazy(+, 0)
value(x)
@yuehhua
Copy link

yuehhua commented Mar 12, 2017

+1
I think the pull / push model is the basic of reactive programming.
To achieve this, wrapping operations into a Task (or coroutine) is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants