1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 13:06:01 +01:00

Make EvalState::callDepth thread-local

This is needed to make it thread-safe.
This commit is contained in:
Eelco Dolstra 2025-07-15 20:16:39 +02:00
parent e8314e69ab
commit 67769e6fc1
2 changed files with 13 additions and 9 deletions

View file

@ -1533,6 +1533,8 @@ void ExprLambda::eval(EvalState & state, Env & env, Value & v)
v.mkLambda(&env, this);
}
thread_local size_t EvalState::callDepth = 0;
void EvalState::callFunction(Value & fun, std::span<Value *> args, Value & vRes, const PosIdx pos)
{
auto _level = addCallDepth(pos);