From 503566a1c6742d1146a8d5b74319607ae7b58e45 Mon Sep 17 00:00:00 2001
From: Tobias Leibner <tobias.leibner@googlemail.com>
Date: Wed, 31 Oct 2018 10:44:01 +0100
Subject: [PATCH] [parallel.threadstorage] make imp_ point to copy

---
 .gitsuper                                | 4 ++--
 dune/xt/common/parallel/threadstorage.hh | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/.gitsuper b/.gitsuper
index 8c91a2eb8..8f80d98eb 100644
--- a/.gitsuper
+++ b/.gitsuper
@@ -14,7 +14,7 @@ status = 1a3bcab04b011a5d6e44f9983cae6ff89fa695e8 bin (heads/master)
 	 741e4f8e53bdd3e1b6e19d84eb22b6e3dc48526c dune-python (remotes/origin/releases/2.5)
 	 26cc8cb4161a3a51002ab2a81b8c81d2c951ee79 dune-testtools (remotes/origin/p/renemilk/testname_listing_hack_no-skiptest)
 	 0a74e7dd0b2115778a5d490dab08a2ed07fcaa1e dune-uggrid (v2.5.2)
-	+effefc7695eba0c0ca94fff0f93026b86501027e dune-xt-common (heads/dailywork_tleibner)
+	+a5fc38a631ec58c85ad2aea4da6f2cef058b7974 dune-xt-common (heads/dailywork_tleibner)
 	+3e3f3bf06e21cbbf3c0a559891b44c6f5d987d0f dune-xt-data (heads/master)
 	+f05aa7470ead4150ca7a91894cd2ad77dfcedc46 dune-xt-functions (heads/new-master)
 	+5be0c7c0e69d6364022421b866016d6443280cf2 dune-xt-grid (heads/new-master)
@@ -95,7 +95,7 @@ commit = 0a74e7dd0b2115778a5d490dab08a2ed07fcaa1e
 [submodule.dune-xt-common]
 remote = git@github.com:dune-community/dune-xt-common.git
 status = 2424627f0ad5de7e4aaa5e7f48bc2a02414d95a1 .vcsetup (heads/master)
-commit = effefc7695eba0c0ca94fff0f93026b86501027e
+commit = a5fc38a631ec58c85ad2aea4da6f2cef058b7974
 
 [submodule.dune-xt-data]
 remote = git@github.com:dune-community/dune-xt-data
diff --git a/dune/xt/common/parallel/threadstorage.hh b/dune/xt/common/parallel/threadstorage.hh
index 85e09cfae..afa43fe7f 100644
--- a/dune/xt/common/parallel/threadstorage.hh
+++ b/dune/xt/common/parallel/threadstorage.hh
@@ -373,7 +373,9 @@ public:
 
   Imp* copy_imp()
   {
-    auto cpy = new Imp(*imp_);
+    auto* cpy = new Imp(*imp_);
+    cpy->imp_ = cpy;
+    cpy->copies_ = copies_;
     cpy->copies_.push_back(cpy);
     DXT_ASSERT(cpy->copies_.size() > 1);
     return cpy;
-- 
GitLab