# How to do multiply updates with Observables.jl?

**URL:** <https://discourse.julialang.org/t/how-to-do-multiply-updates-with-observables-jl/96936>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [April 1, 2023, 9:10am UTC](https://discourse.julialang.org/t/how-to-do-multiply-updates-with-observables-jl/96936 "2023-04-01T09:10:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pzabka](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pzabka/32/46255_2.png) [@pzabka](https://discourse.julialang.org/u/pzabka)\
**Post date:** [April 1, 2023, 9:10am UTC](https://discourse.julialang.org/t/how-to-do-multiply-updates-with-observables-jl/96936/1 "2023-04-01T09:10:49Z")

</div>

In version 0.4 of Observables.jl, it was possible to [fire several events on an update using channels](https://juliagizmos.github.io/Observables.jl/v0.4/#Multiply-updates). However, it disappeared from version 0.5. Is there any way how to do it now? It would be useful for making a video player in Makie.

---

<div class="post-metadata">

**Author:** ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)\
**Post date:** [April 4, 2023, 11:30pm UTC](https://discourse.julialang.org/t/how-to-do-multiply-updates-with-observables-jl/96936/2 "2023-04-04T23:30:44Z")

</div>

This seems a bit clunky, but it might solve your problem.

```julia
trigger = Observable(1)

multiple = Observable(1)

on(trigger) do value
    for i in 1:10
        multiple[] = i + value
    end
end

on(multiple) do value
    println("value is $value")
end

trigger[] = 3

```

---

<div class="post-metadata">

**Author:** ![pzabka](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pzabka/32/46255_2.png) [@pzabka](https://discourse.julialang.org/u/pzabka)\
**Post date:** [April 5, 2023, 7:55am UTC](https://discourse.julialang.org/t/how-to-do-multiply-updates-with-observables-jl/96936/3 "2023-04-05T07:55:59Z")

</div>

Thank you for the help. I was too fixed on channels, but it is possible to do it without them. This example works well, but for my code to work, there needs to be “@async for”.
