Because the config syntax we inherited from Vyatta is highly ambiguous, it requires a lexer hack to parse correctly: the lexer keeps track of an internal state to determine whether a newline is just a newline or a leaf node terminator.
Right now that state is implemented as a mutable reference. That makes the lexer code non-reentrant and thread-unsafe. Not a big problem now that OCaml still has a global runtime lock and our commits are also strictly sequential, but both of those will change in the future. OCaml 5.0 removes the global lock and adds a multi-core GC, and VyOS is also getting closer to a point when we can actually replace the backend.
It would be nice to ensure that our code is re-entrant by that point.