template <typename _Param, typename _Ret>
thread_(_Ret (*func)(_Param), _Param param=0, void* opt=NULL)
{
- if ( start(func,(int)param,opt) != true )
+ if ( start(func,param,opt) != true )
thread_exception("thread start failed.");
}
////////////////////////////////////////////////////////
- template <typename _Param>
- bool start(roast_thread_func_t func, _Param param=0, void* opt=NULL)
+ bool start(roast_thread_func_t func, int param=0, void* opt=NULL)
{
return start_func(func,param,opt);
}
return start_func(func,param,opt);
}
- template <typename T, typename _Param>
+ /* template <typename T, typename _Param>
bool start(const T &cls, _Param param=0, void* opt=NULL)
{
return start_class(cls,param,opt);
bool start(_Ret (T::*func)(_Param), T *ptr, _Param param=0, void* opt=NULL)
{
return start_class_ptr(func,ptr,param,opt);
- }
+ }*/
#endif
////////////////////////////////////////////////////////
template <typename _Param, typename _Ret>
bool start_func(_Ret (*func)(_Param), _Param param=0, void* opt=NULL)
{
- m_handle = m_impl.start(func,param,opt);
+ m_handle = m_impl.start((roast_thread_func_t)func,(int)param,opt);
if ( m_handle == NULL )
return false;
else