1 #ifndef _SIGX_GLIB_THREADABLE_HPP_
2 #define _SIGX_GLIB_THREADABLE_HPP_
23 #include <sigc++/functors/slot.h>
24 #include <glibmm/refptr.h>
25 #include <glibmm/thread.h>
26 #include <glibmm/main.h>
27 #include <sigxconfig.h>
176 template<
typename T_functor>
177 void run(
const T_functor& func_on_thread_ready);
215 void create_thread(
const sigc::slot<void>& slot_on_thread_ready);
224 void on_run(
const sigc::slot<void>& slot_on_thread_ready);
229 void on_idle_and_ready(Glib::Mutex& mtx, Glib::Cond& cond);
251 sigc::mem_fun(&Glib::MainContext::signal_idle),
274 sigc::mem_fun(&Glib::MainContext::signal_timeout),
297 sigc::mem_fun(&Glib::MainContext::signal_io),
320 sigc::mem_fun(&Glib::MainContext::signal_child_watch),
335 Glib::Private<threaddata> m_threaddata;
337 mutex_lockable_thread m_thread;
376 template<
typename T_functor>
388 SIGX_STATIC_ASSERT((sigc::is_base_and_derived<tunnel_base, typename auto_tunneler_t::functor_type>::value ==
true));
390 const typename auto_tunneler_t::functor_type& functor2callback =
391 auto_tunneler_t::auto_open_tunnel(func_on_thread_ready);
397 create_thread(sigc::slot<void>(functor2callback));
404 #endif // end file guard