Revert "Simplified Thread interface"
This reverts commit 49927a03e4a9bfd4681691bb859b08374cd309c6 [formerly f3cfc12d8c18eef8a8aa21c164ad994fff4a33b7]. Former-commit-id: 8315c5f18d29aff59749c2efe98208ee3f5e1a42
This commit is contained in:
parent
b4282e6a6e
commit
023e497777
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue