A C++ library for logging very fast and without allocating.
Ви не можете вибрати більше 25 тем
Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
|
#pragma once
|
|
|
|
#include <unordered_map>
|
|
#include <string>
|
|
#include <functional>
|
|
#include <any>
|
|
#include "disruptor.h"
|
|
|
|
struct registry_slab {
|
|
int id;
|
|
std::string name;
|
|
std::function<token_t(size_t)> reserve_write;
|
|
std::function<token_t(size_t)> reserve_write_c_align;
|
|
std::function<void(token_t)> conclude_write;
|
|
std::function<write_span(token_t)> get_buffer;
|
|
std::any disruptor;
|
|
};
|
|
|
|
/**
|
|
* @internal used because we need the pointer stability
|
|
* @see sl_transaction
|
|
*/
|
|
extern std::unordered_map<int, registry_slab> registry_map;
|