Documentation for Thread

Former-commit-id: b33bbdf473792ddcde8ffbe310722d83a1a12bcf
This commit is contained in:
Gawaboumga
2016-02-21 14:29:03 +01:00
parent 44ec6caf5d
commit c163d65da7
6 changed files with 232 additions and 4 deletions

View File

@@ -7,18 +7,43 @@
namespace Nz
{
/*!
* \class Nz::Thread
* \brief Core class that represents a thread
*/
/*!
* \brief Constructs a Thread<T> object with a function
*
* \param function Task the thread will execute in parallel
*/
template<typename F>
Thread::Thread(F function)
{
CreateImpl(new FunctorWithoutArgs<F>(function));
}
/*!
* \brief Constructs a Thread<T> object with a function and its parameters
*
* \param function Task the thread will execute in parallel
* \param args Arguments of the function
*/
template<typename F, typename... Args>
Thread::Thread(F function, Args&&... args)
{
CreateImpl(new FunctorWithArgs<F, Args...>(function, std::forward<Args>(args)...));
}
/*!
* \brief Constructs a Thread<T> object with a member function and its object
*
* \param function Task the thread will execute in parallel
* \param object Object on which the method will be called
*/
template<typename C>
Thread::Thread(void (C::*function)(), C* object)
{