diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-04-18 07:38:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-04-18 07:38:22 +0200 |
commit | 912ac87012ffc2fd0c6fb21823a0244c787ce5ba (patch) | |
tree | 4861fd4b2bcdcfb61b97f215e3a24efaca25af57 /libbuild2/file.cxx | |
parent | 56e38cffbd730e66261d9da29c8da91d39ebb167 (diff) |
Avoid locking target set if in load phase
Diffstat (limited to 'libbuild2/file.cxx')
-rw-r--r-- | libbuild2/file.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libbuild2/file.cxx b/libbuild2/file.cxx index d789d20..31db943 100644 --- a/libbuild2/file.cxx +++ b/libbuild2/file.cxx @@ -2880,6 +2880,9 @@ namespace build2 if (!t || *t == nullptr) { + // Note: we need the lock because process_path() call below is not + // MT-safe. + // pair<target&, ulock> r (insert_target (trace, ctx, tt, p)); t = &r.first; |