Aller au contenu
Bienvenue sur la nouvelle documentation de CppUtils !
ThreadLoop::ThreadLoop() = delete;

explicit ThreadLoop::ThreadLoop(std::function<void()> function, std::function<void()> interruptFunction = nullptr, std::function<void(std::exception_ptr)> onError = nullptr) noexcept;

ThreadLoop::ThreadLoop(const ThreadLoop&) = delete;

auto ThreadLoop::operator=(const ThreadLoop&) -> ThreadLoop& = delete;

ThreadLoop::ThreadLoop(ThreadLoop&& other) noexcept;

auto ThreadLoop::operator=(ThreadLoop&& other) noexcept -> ThreadLoop&;

ThreadLoop::~ThreadLoop() noexcept;

[[nodiscard]] auto ThreadLoop::isRunning() const noexcept -> bool;

auto ThreadLoop::setInterruptFunction(std::function<void()> interruptFunction) noexcept -> void;

auto ThreadLoop::setOnError(std::function<void(std::exception_ptr)> onError) noexcept -> void;

auto ThreadLoop::start() -> void;

[[nodiscard]] auto ThreadLoop::isStopRequested() const noexcept -> bool;

auto ThreadLoop::requestStop() -> void;

auto ThreadLoop::stop() noexcept -> void;