From 2eb4705ae6026ee938560e83c5b41484e923f096 Mon Sep 17 00:00:00 2001 From: dario Date: Thu, 18 Jan 2024 13:24:31 +0100 Subject: [PATCH] Added return value to addThread --- include/sta/tacos.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/sta/tacos.hpp b/include/sta/tacos.hpp index 3ca9f85..b92f699 100644 --- a/include/sta/tacos.hpp +++ b/include/sta/tacos.hpp @@ -68,9 +68,13 @@ namespace sta * @ingroup tacos_api */ template - void addThread(std::list states, Args ... args) + std::shared_ptr addThread(std::list states, Args ... args) { - Manager::instance()->registerThread(std::make_shared(args...), states); + std::shared_ptr thread_ptr = std::make_shared(args...); + + Manager::instance()->registerThread(thread_ptr, states); + + return thread_ptr; } } // namespace tacos }