19class Context :
public ThreadLocalSingleton<Context> {
21 void init(Ring *ring, Runtime *runtime)
noexcept {
26 void reset() noexcept {
32 Ring *ring() noexcept {
return ring_; }
34 Runtime *runtime() noexcept {
return runtime_; }
36 uint16_t next_bgid() {
return bgid_pool_.allocate(); }
38 void recycle_bgid(uint16_t bgid)
noexcept { bgid_pool_.recycle(bgid); }
41 Ring *ring_ =
nullptr;
42 Runtime *runtime_ =
nullptr;
43 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.