Skip to content

Nested progression info #36

Open
Open

Description

@HenrikBengtsson

In order to support refined progression info at the top level, aggregators should/could relay nested info that provide info on the current step and any nested steps, e.g. step = c(2, 23). Same for messages and max_steps.

Activity

  1. HenrikBengtsson commented on Jun 9, 2019

    @HenrikBengtsson
    CollaboratorAuthor

    Capture-gather-and-release progressions:

    library(progressr)
    with_progress({
    p <- progressor(3L)
    ## Listen for progressions and if detected relay in 10 microsteps summing up to one.
    ## otherwise signal one step at the end
    p(y1 <- slow_sum(1:10))
    ## Listen for progressions and if detected relay in 5 microsteps summing up to one,
    ## otherwise signal one step at the end
    p(y2 <- slow_sum(5:1))
    ## Listen for progressions, but nothing signaled, so a one-step progression is signaled at the end
    p(z <- y1 + y2)
    })

    But, it would be nice if we could write this as:

    with_progress({
    p <- progressor(3L)
    ## Listen for progressions and if detected relay in 10 microsteps summing up to one.
    ## otherwise signal one step at the end
    p("listen")
    y1 <- slow_sum(1:10)
    
    ## Listen for progressions and if detected relay in 5 microsteps summing up to one,
    ## otherwise signal one step at the end
    p("listen")
    y2 <- slow_sum(5:1)
    
    ## Listen for progressions, but nothing signaled, so a one-step progression is signaled at the end
    p("listen")
    z <- y1 + y2
    })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions