inst/vignettes-static/incl/future-1-overview-example3.R

pid <- Sys.getpid()

a %<-% {
  cat("Future 'a' ...\n")
  Sys.getpid()
}

b %<-% {
  cat("Future 'b' ...\n")
  b1 %<-% {
    cat("Future 'b1' ...\n")
    Sys.getpid()
  }
  b2 %<-% {
    cat("Future 'b2' ...\n")
    Sys.getpid()
  }
  c(b.pid = Sys.getpid(), b1.pid = b1, b2.pid = b2)
}

Try the future package in your browser

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

future documentation built on Sept. 11, 2024, 7:35 p.m.