BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bseenginemaster.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __BSE_ENGINE_MASTER_H__
00003 #define __BSE_ENGINE_MASTER_H__
00004 #include <bse/bseengine.hh>
00005 G_BEGIN_DECLS
00006 
00007 /* --- internal (EngineThread) --- */
00008 gboolean        _engine_master_prepare          (BseEngineLoop          *loop);
00009 gboolean        _engine_master_check            (const BseEngineLoop    *loop);
00010 void            _engine_master_dispatch_jobs    (void);
00011 void            _engine_master_dispatch         (void);
00012 
00013 namespace Bse {
00014 
00015 class MasterThread {
00016   std::thread           thread_;
00017   EventFd               event_fd_;
00018   std::function<void()> caller_wakeup_;
00019   void          master_thread   ();
00020 public:
00021   explicit      MasterThread    (const std::function<void()> &caller_wakeup);
00022   void          wakeup          ()      { event_fd_.wakeup(); }
00023 };
00024 
00025 } // Bse
00026 
00027 G_END_DECLS
00028 #endif /* __BSE_ENGINE_MASTER_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines