From e3e98ed67808ff1903458803f40cb3e4bbfb0fd6 Mon Sep 17 00:00:00 2001 From: tensor-tang Date: Thu, 5 Sep 2019 11:37:15 +0800 Subject: [PATCH] fix scope lock bug on infer (#19624) --- paddle/fluid/framework/scope.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paddle/fluid/framework/scope.h b/paddle/fluid/framework/scope.h index 9de2963234d..d3e2f33d2e3 100644 --- a/paddle/fluid/framework/scope.h +++ b/paddle/fluid/framework/scope.h @@ -141,9 +141,12 @@ class Scope { DISABLE_COPY_AND_ASSIGN(Scope); +#ifndef PADDLE_ON_INFERENCE + private: mutable RWLock kids_lock_; mutable RWLock vars_lock_; +#endif }; // Generate some debug string about the inherience structure of scope, quite -- GitLab