diff --git a/regen.cc b/regen.cc index b6c2872b..4374f817 100644 --- a/regen.cc +++ b/regen.cc @@ -23,6 +23,7 @@ #include #include +#include "affinity.h" #include "fileutil.h" #include "find.h" #include "func.h" @@ -429,6 +430,7 @@ class StampChecker { tp->Submit([this]() { string err; // TODO: Make glob cache thread safe and create a task for each glob. + SetAffinityForSingleThread(); for (GlobResult* gr : globs_) { if (CheckGlobResult(gr, &err)) { unique_lock lock(mu_); @@ -442,6 +444,7 @@ class StampChecker { }); tp->Submit([this]() { + SetAffinityForSingleThread(); for (ShellResult* sr : commands_) { string err; if (CheckShellResult(sr, &err)) {