#pragma once
#include "type.h"
namespace co_context {
    class io_context;
    namespace detail {
        struct worker_meta;
        struct thread_meta {
            // The running io_context on this thread.
            io_context *ctx = nullptr;
            worker_meta *worker = nullptr; // ctx + offset = worker

            ctx_id_t ctx_id = static_cast<ctx_id_t>(-1);
        };
        extern thread_local thread_meta this_thread; // NOLINT(*global-variables)
    } // namespace co_context::detail
}