inst/test-db/lazy.R

make_test(title = "resolved() on lazy futures", tags = c("resolved", "lazy"), {
  f <- future(42, lazy = TRUE)
  while (!resolved(f)) {
    Sys.sleep(0.1)
  }
  v <- value(f)
  stopifnot(identical(v, 42))
})

Try the future.tests package in your browser

Any scripts or data that you put into this service are public.

future.tests documentation built on May 31, 2023, 9:28 p.m.