thread_exception("thread start failed.");
}
-#ifndef _ROAST_INVALID_TEMPLATE_OVERLOAD
+//#ifndef _ROAST_INVALID_TEMPLATE_OVERLOAD
template <typename _Class, typename _Param, typename _Ret>
thread_(_Class* p_this, _Ret (_Class::*func)(_Param), _Param param=0, void* opt=NULL)
{
if ( start_class_ptr(p_this,func,param,opt) != true )
thread_exception("thread start failed.");
}
-#endif
+//#endif
virtual ~thread_()
{
release();
return start_class(cls,param,opt);
}
+ /*
template <typename _Class, typename _Param>
bool start(_Class *ptr, _Param param=0, void* opt=NULL)
{
return start_class_ptr(ptr,param,opt);
}
- /*template <typename _Class, typename _Param, typename _Ret>
+ template <typename _Class, typename _Param, typename _Ret>
bool start(_Ret (_Class::*func)(_Param), _Param param=0, void* opt=NULL)
{
// The second parameter is a class pointer or the method should be static.
return true;
}
+ /*
template <typename _Class, typename _Param>
bool start_class_ptr(_Class *p_this, _Param param=0, void* opt=NULL)
{
// The second parameter is a class pointer or the method should be static.
The_second_parameter_is_a_class_pointer_or_the_method_should_be_static.
}
+ */
template <typename _Class, typename _Param, typename _Ret>
- bool start_class_ptr(_Ret (_Class::*func)(_Param), _Class *ptr, _Param param=0, void* opt=NULL)
+ bool start_class_ptr(_Class *p_this, _Ret (_Class::*func)(_Param), _Param param=0, void* opt=NULL)
{
m_handle = m_impl.start(
_thread_class_internal_callback<_Class>,
- (int)new _thread_start_class_info<_Class>(ptr, func, param, false),
+ (int)new _thread_start_class_info<_Class>(p_this, func, param, false),
opt);
if ( m_handle == NULL )
return false;