From 267d34d2800d9cc3ed2865cbecf8d32f8f1ab6ec Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 26 Jan 2017 16:10:01 +0200 Subject: Add comment --- build2/context | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build2/context b/build2/context index 9f1e956..7f533ca 100644 --- a/build2/context +++ b/build2/context @@ -14,12 +14,14 @@ namespace build2 { - // Top-level internal state mutex. + // Top-level model (internal state) mutex and its per-thread shared lock. + // + // - model_lock is NULL during serial execution, all changes are a go + // - model_lock is not NULL during parallel execution, append-only changes + // - parallel execution starts with a shared lock by creating model_slock // extern shared_mutex model; - // Thread's shared model lock. NULL in the serial stages. - // extern #ifdef __cpp_thread_local thread_local -- cgit v1.1