25 lines
487 B
C++
25 lines
487 B
C++
#pragma once
|
|
|
|
#include "ddkit/base/Thread.hpp"
|
|
#include <functional>
|
|
|
|
namespace ddkit {
|
|
namespace base {
|
|
|
|
class ThreadInline final : public Thread {
|
|
public:
|
|
ThreadInline(const std::string& name, const std::function<void()>& function);
|
|
~ThreadInline() override;
|
|
|
|
private:
|
|
std::function<void()> m_function;
|
|
|
|
void run() override;
|
|
|
|
ThreadInline(ThreadInline const&) = delete;
|
|
void operator=(ThreadInline const&) = delete;
|
|
};
|
|
|
|
} // namespace base
|
|
} // namespace ddkit
|