diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-10-29 11:14:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-10-29 11:14:51 +0200 |
commit | 653748e3673f515c2ceabe9ef2d57ba087abeb7a (patch) | |
tree | 6965c87645624dbfdc0d590756e79e6a9dc7a4d9 /libbuild2 | |
parent | f8ef04cb484821ed37dd2a7f139d0ac5cc65338c (diff) |
Tweak fix for data race in ad hoc member state when group is postponed
Diffstat (limited to 'libbuild2')
-rw-r--r-- | libbuild2/target.ixx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libbuild2/target.ixx b/libbuild2/target.ixx index 5e24b20..47dff3d 100644 --- a/libbuild2/target.ixx +++ b/libbuild2/target.ixx @@ -294,16 +294,16 @@ namespace build2 // this feels harmless (ad hoc membership cannot be changed during the // execute phase). // - // Note: if the member state is postponed, then the group state may not be - // yet known (see group_action() for details). - // // Note: this test must come first since the member may not be matched and // thus its state set (but it won't be postponed; see opstate::state). // - if (ctx.phase == run_phase::execute && - adhoc_group_member () && - s.state != target_state::postponed) - return true; + if (ctx.phase == run_phase::execute && adhoc_group_member ()) + { + // Note: if the member state is postponed, then the group state may not + // be yet known (see group_action() for details). + // + return s.state != target_state::postponed; + } if (s.state == target_state::group) return true; |