[Rd] R hang/bug with circular references and promises
Travers Ching
tr@ver@c @end|ng |rom gm@||@com
Sat May 11 02:39:53 CEST 2024
The following code snippet causes R to hang. This example might be a
bit contrived as I was experimenting and trying to understand
promises, but uses only base R.
It looks like it is looking for "not_a_variable" recursively but since
it doesn't exist it goes on indefinitely.
x0 <- new.env()
x1 <- new.env(parent = x0)
parent.env(x0) <- x1
delayedAssign("v", not_a_variable, eval.env=x1)
delayedAssign("w", v, assign.env=x1, eval.env=x0)
x1$w
More information about the R-devel
mailing list