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 }