# NOT RUN {
SampleSomething <- function() {
Sys.sleep(0.1)
rnorm(1)
}
backing.path <- tempfile()
dir.create(backing.path)
print(backing.path)
SlowMcmc <- InitMcmc(1000, backing.path=backing.path)
SlowMcmc({
x <- SampleSomething()
})
### In another R process, while the MCMC is still running...
samples.so.far <- Peek(backing.path)
samples.so.far$x[,]
# }
Run the code above in your browser using DataLab