![]() |
Libftpp
A modern C++ library
|
Simple Thread Wrapper. More...
#include <thread.hpp>
Public Member Functions | |
| Thread (const std::string &name, std::function< void()> funcToExecute) | |
| ~Thread () | |
| void | start () |
| void | stop () |
Simple Thread Wrapper.
This class provides a simple wrapper around std::thread to manage a thread that executes a user-defined function. It includes basic start and stop functionality along with a thread-safe output stream for logging.
Definition at line 35 of file thread.hpp.
| Thread::Thread | ( | const std::string & | name, |
| std::function< void()> | funcToExecute | ||
| ) |
Definition at line 7 of file thread.cpp.
References ThreadSafeIOStream::setPrefix().
| Thread::~Thread | ( | ) |
Definition at line 3 of file thread.cpp.
References stop().
| void Thread::start | ( | ) |
Definition at line 13 of file thread.cpp.
References stop().
| void Thread::stop | ( | ) |
Definition at line 23 of file thread.cpp.