You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alexrp edited this page Mar 22, 2013
·
3 revisions
Cycles can appear in some places when doing CTE.
Consider:
pub glob foo : int = bar();
pub fn bar() -> int {
foo;
}
If we're currently evaluating the RHS of a glob or tls, we simply flag any access of that glob/tls as invalid.
There is also the problem of dealing with infinite loops during CTE. Of course, this problem is generally not practical to solve, but what we can do is allow the programmer to specify timeouts for CTE operations. Since Flect is implemented in Elixir, running the CTE interpreter in a separate Erlang process and giving it a timeout is trivial.
The most sensible way to specify a timeout is probably via an environment variable. It would be a bad idea to pretend that the timeout is a build system concern, since whether a timeout is sufficient depends entirely on the machine compilation takes place on.