20class Context :
public ThreadLocalSingleton<Context> {
22 void init(Ring *ring, Runtime *runtime)
noexcept {
27 void reset() noexcept {
33 Ring *ring() noexcept {
return ring_; }
35 Runtime *runtime() noexcept {
return runtime_; }
37 uint16_t next_bgid() {
return bgid_pool_.allocate(); }
39 void recycle_bgid(uint16_t bgid)
noexcept { bgid_pool_.recycle(bgid); }
42 Ring *ring_ =
nullptr;
43 Runtime *runtime_ =
nullptr;
44 IdPool<uint16_t> bgid_pool_;
The event loop runtime for executing asynchronous.
The main namespace for the Condy library.
Internal utility classes and functions used by Condy.