Revert "Simplified Thread interface"

This reverts commit 49927a03e4a9bfd4681691bb859b08374cd309c6 [formerly f3cfc12d8c18eef8a8aa21c164ad994fff4a33b7].


Former-commit-id: 8315c5f18d29aff59749c2efe98208ee3f5e1a42
This commit is contained in:
Lynix 2012-12-03 00:25:39 +01:00
parent b4282e6a6e
commit 023e497777
2 changed files with 8 additions and 4 deletions

View File

@ -40,6 +40,7 @@ class NAZARA_API NzThread : NzNonCopyable
};
NzThread() = default;
template<typename F> NzThread(F function);
template<typename F, typename... Args> NzThread(F function, Args... args);
template<typename C> NzThread(void (C::*function)(), C* object);
NzThread(NzThread&& other);

View File

@ -4,13 +4,16 @@
#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)
{
if (sizeof...(Args) == 0)
CreateImpl(new NzFunctorWithoutArgs<F>(function));
else
CreateImpl(new NzFunctorWithArgs<F, Args...>(function, args...));
CreateImpl(new NzFunctorWithArgs<F, Args...>(function, args...));
}
template<typename C>