]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
neorados: use strand template and make_strand()
authorCasey Bodley <cbodley@redhat.com>
Fri, 10 Feb 2023 15:36:22 +0000 (10:36 -0500)
committerAdam Emerson <aemerson@redhat.com>
Thu, 14 Sep 2023 21:20:35 +0000 (17:20 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/neorados/RADOS.cc

index 7ad60bb767fc2be0b09a1ed55edfe9c6a320e18d..d156a49e8a501546092027b9837c40b19be66a2a 100644 (file)
@@ -1168,7 +1168,7 @@ void RADOS::flush_watch(std::unique_ptr<VoidOpComp> c)
 
 struct NotifyHandler : std::enable_shared_from_this<NotifyHandler> {
   boost::asio::io_context& ioc;
-  boost::asio::io_context::strand strand;
+  boost::asio::strand<boost::asio::io_context::executor_type> strand;
   Objecter* objecter;
   Objecter::LingerOp* op;
   std::unique_ptr<RADOS::NotifyComp> c;
@@ -1182,7 +1182,8 @@ struct NotifyHandler : std::enable_shared_from_this<NotifyHandler> {
                Objecter* objecter,
                Objecter::LingerOp* op,
                std::unique_ptr<RADOS::NotifyComp> c)
-    : ioc(ioc), strand(ioc), objecter(objecter), op(op), c(std::move(c)) {}
+    : ioc(ioc), strand(boost::asio::make_strand(ioc)),
+      objecter(objecter), op(op), c(std::move(c)) {}
 
   // Use bind or a lambda to pass this in.
   void handle_ack(bs::error_code ec,