logary icon indicating copy to clipboard operation
logary copied to clipboard

Pipe.combineLatest: need a way to delay emitting values until some condition is true

Open haf opened this issue 6 years ago • 1 comments

For example:

        Events.events
        |> Pipe.filter Message.isGauge
        |> Pipe.scan (Dictionary<PointName, int64>()) (fun state message ->
            fun m ->
              let k = gaugeKey message
              match state.TryGetValue k with
              | false, _ ->
                state.[k] <- 1L
                state
              | true, _ ->
                state.[k] <- state.[k] + 1L
                state
        )
        |> Pipe.combineLatest (Events.events |> Pipe.filter (Message.hasTag "summary"))
        |> Events.sink ["colours"]

haf avatar Apr 19 '18 11:04 haf

combineLatest maybe expressed through bufferConditional ? can i see these implementation for more details ? scan here seems like some ticker ?

lust4life avatar Dec 14 '18 12:12 lust4life