gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

networkThread.h (402B)


      1 #pragma once
      2 
      3 #include <memory>
      4 #include <thread>
      5 
      6 namespace networkLib
      7 {
      8 	class NetworkThread
      9 	{
     10 	protected:
     11 		NetworkThread() = default;
     12 		~NetworkThread();
     13 
     14 		virtual void threadLoopFunc() {}
     15 		virtual void threadFunc();
     16 
     17 		bool exit() const { return m_exit; }
     18 		void exit(bool _exit);
     19 
     20 		void start();
     21 		void stop();
     22 
     23 	private:
     24 		std::unique_ptr<std::thread> m_thread;
     25 		bool m_exit = false;
     26 	};
     27 }