f <- function() "f"
g <- function() "g"
limited <- limit_rate(
list(
f = f,
g = g
),
rate(n = 1, period = 1)
)
# this works correctly
system.time({
limited$f(); limited$g()
})
limited2 <- reset(limited)
# but this finishes in 0 seconds
system.time({
limited2$f(); limited2$g()
})
# this still works correctly
system.time({
limited$f(); limited$g()
})
Example: