A C++ library for logging very fast and without allocating.
Nie możesz wybrać więcej, niż 25 tematów
Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
|
#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;
|