aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/context.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-05-12 10:46:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-05-12 16:30:12 +0200
commit88379eedeae654391711d8cdda17dfc2be6367ef (patch)
tree966ee03369b51013021600a2beea8334962ab2ec /libbuild2/context.hxx
parent8b858c642ccab43050dcff2d8f98db469ac6dc1b (diff)
Keep phase locked while working own queue
Diffstat (limited to 'libbuild2/context.hxx')
-rw-r--r--libbuild2/context.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/libbuild2/context.hxx b/libbuild2/context.hxx
index 0d401de..ad89f58 100644
--- a/libbuild2/context.hxx
+++ b/libbuild2/context.hxx
@@ -594,10 +594,14 @@ namespace build2
//
struct LIBBUILD2_SYMEXPORT phase_unlock
{
- phase_unlock (context&, bool unlock = true);
+ phase_unlock (context&, bool unlock = true, bool delay = false);
~phase_unlock () noexcept (false);
- phase_lock* l;
+ void
+ unlock ();
+
+ context* ctx;
+ phase_lock* lock;
};
// Assuming we have a lock on the current phase, temporarily switch to a