From 30ab3c0586b7413490e98f181f4db0528c3f2119 Mon Sep 17 00:00:00 2001 From: nfrmtkr Date: Mon, 8 Jan 2024 10:03:39 +0100 Subject: [PATCH] Update Future.h Fixed a race condition caused by the double checked locking pattern by using an std::atomic that ensures correct and deterministic create and assignment logic. --- ACE/ace/Future.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACE/ace/Future.h b/ACE/ace/Future.h index e07756fc8807c..579cc4e70038b 100644 --- a/ACE/ace/Future.h +++ b/ACE/ace/Future.h @@ -197,7 +197,7 @@ class ACE_Future_Rep int ready () const; /// Pointer to the result. - T *value_; + std::atomic value_; /// Reference count. int ref_count_;