[Parallel_libs-commits] [PATCH] D24142: [SE] Make Stream movable

Justin Lebar via Parallel_libs-commits parallel_libs-commits at lists.llvm.org
Thu Sep 1 09:52:49 PDT 2016


jlebar accepted this revision.
jlebar added a comment.
This revision is now accepted and ready to land.

Yeah, I like this better too.


================
Comment at: streamexecutor/include/streamexecutor/Stream.h:344
@@ -340,2 +343,3 @@
   ///
   /// Mutable so that it can be obtained via const reader lock.
+  std::unique_ptr<llvm::sys::RWMutex> ErrorMessageMutex;
----------------
No longer mutable

================
Comment at: streamexecutor/lib/Stream.cpp:21
@@ -21,1 +20,3 @@
+    : PDevice(PStream->getDevice()), ThePlatformStream(std::move(PStream)),
+      ErrorMessageMutex(new llvm::sys::RWMutex) {}
 
----------------
Nit, usually prefer make_unique so that it's clear that the destination variable is a unique_ptr.


https://reviews.llvm.org/D24142





More information about the Parallel_libs-commits mailing list