From tr@ver@c @end|ng |rom gm@||@com  Sat May 11 02:39:53 2024
From: tr@ver@c @end|ng |rom gm@||@com (Travers Ching)
Date: Fri, 10 May 2024 17:39:53 -0700
Subject: [Rd] R hang/bug with circular references and promises
Message-ID: <CAPLMX9EyfB7cLgu89WPT_RFeuC1BDPYcZ81jR2q1aaDPVtnkEw@mail.gmail.com>

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



[Rd] R hang/bug with circular references and promises
Travers Ching