#pragma once

#include <mutex>
#include <thread>

#include "Core/Constant.h"

class ThreadChecker {
    NON_COPYABLE(ThreadChecker)

public:
    ThreadChecker();
    ~ThreadChecker();

    bool CalledOnValideThread(void) const;
    void DetachFromThread(void);

private:
    mutable std::mutex mutex_;
    mutable std::thread::id threadId_;
};

void SetThreadName(const std::string& name);
