A C++ library for logging very fast and without allocating.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

22 lignes
550 B

  1. #pragma once
  2. #include <unordered_map>
  3. #include <string>
  4. #include <functional>
  5. #include <any>
  6. #include "disruptor.h"
  7. struct registry_slab {
  8. int id;
  9. std::string name;
  10. std::function<token_t(size_t)> reserve_write;
  11. std::function<token_t(size_t)> reserve_write_c_align;
  12. std::function<void(token_t)> conclude_write;
  13. std::function<write_span(token_t)> get_buffer;
  14. std::any disruptor;
  15. };
  16. /**
  17. * @internal used because we need the pointer stability
  18. * @see sl_transaction
  19. */
  20. extern std::unordered_map<int, registry_slab> registry_map;