SkyPulse UAV V0.1
Loading...
Searching...
No Matches
CppThread.hpp
Go to the documentation of this file.
1#ifndef __CPP_THREAD_H_
2#define __CPP_THREAD_H_
3
11#include <thread>
12
20class CppThread {
21
22public:
26 inline void start() {
27 uthread = std::thread(&CppThread::run, this);
28 }
29
33 inline void join() {
34 uthread.join();
35 }
36
37protected:
43 virtual void run() = 0;
44
45private:
46 // pointer to the thread
47 std::thread uthread;
48};
49
50
51#endif
Definition CppThread.hpp:20
void start()
Definition CppThread.hpp:26
virtual void run()=0
void join()
Definition CppThread.hpp:33