Simplified Thread interface
Former-commit-id: 5cc7c51be1bf8fe8f13e3b4d25b051ff024f4ebf
This commit is contained in:
@@ -4,16 +4,13 @@
|
||||
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
template<typename F>
|
||||
NzThread::NzThread(F function)
|
||||
{
|
||||
CreateImpl(new NzFunctorWithoutArgs<F>(function));
|
||||
}
|
||||
|
||||
template<typename F, typename... Args>
|
||||
NzThread::NzThread(F function, Args... args)
|
||||
{
|
||||
CreateImpl(new NzFunctorWithArgs<F, Args...>(function, args...));
|
||||
if (sizeof...(Args) == 0)
|
||||
CreateImpl(new NzFunctorWithoutArgs<F>(function));
|
||||
else
|
||||
CreateImpl(new NzFunctorWithArgs<F, Args...>(function, args...));
|
||||
}
|
||||
|
||||
template<typename C>
|
||||
|
||||
Reference in New Issue
Block a user