// Copyright (C) 2017 Jérôme Leclercq // This file is part of the "Nazara Engine - Core module" // For conditions of distribution and use, see copyright notice in Config.hpp #include #include namespace Nz { /*! * \ingroup core * \class Nz::Thread * \brief Core class that represents a thread */ /*! * \brief Constructs a Thread object with a function * * \param function Task the thread will execute in parallel */ template Thread::Thread(F function) { CreateImpl(new FunctorWithoutArgs(function)); } /*! * \brief Constructs a Thread object with a function and its parameters * * \param function Task the thread will execute in parallel * \param args Arguments of the function */ template Thread::Thread(F function, Args&&... args) { CreateImpl(new FunctorWithArgs(function, std::forward(args)...)); } /*! * \brief Constructs a Thread 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 Thread::Thread(void (C::*function)(), C* object) { CreateImpl(new MemberWithoutArgs(function, object)); } } #include