BEAST/BSE - Better Audio System and Sound Engine  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bseenginemaster.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __BSE_ENGINE_MASTER_H__
3 #define __BSE_ENGINE_MASTER_H__
4 #include <bse/bseengine.hh>
5 G_BEGIN_DECLS
6 
7 /* --- internal (EngineThread) --- */
8 gboolean _engine_master_prepare (BseEngineLoop *loop);
9 gboolean _engine_master_check (const BseEngineLoop *loop);
10 void _engine_master_dispatch_jobs (void);
11 void _engine_master_dispatch (void);
12 
13 namespace Bse {
14 
15 class MasterThread {
16  std::thread thread_;
17  EventFd event_fd_;
18  std::function<void()> caller_wakeup_;
19  void master_thread ();
20 public:
21  explicit MasterThread (const std::function<void()> &caller_wakeup);
22  void wakeup () { event_fd_.wakeup(); }
23 };
24 
25 } // Bse
26 
27 G_END_DECLS
28 #endif /* __BSE_ENGINE_MASTER_H__ */
Definition: bseenginemaster.hh:15
Definition: bseengine.hh:206