unilink  0.4.3
A simple C++ library for unified async communication
unilink::builder::AutoInitializer Class Reference

Helper class that automatically initializes IoContextManager in Builder pattern. More...

#include <auto_initializer.hpp>

Static Public Member Functions

static void ensure_io_context_running ()
 Automatically start IoContextManager if not running. More...
 
static bool is_io_context_running ()
 Check if IoContextManager is running. More...
 

Detailed Description

Helper class that automatically initializes IoContextManager in Builder pattern.

This class automatically starts IoContextManager when using Builder pattern, eliminating the need for manual initialization by users.

Definition at line 33 of file auto_initializer.hpp.

Member Function Documentation

◆ ensure_io_context_running()

static void unilink::builder::AutoInitializer::ensure_io_context_running ( )
inlinestatic

Automatically start IoContextManager if not running.

This method is thread-safe and can be called multiple times safely. If already running, it does nothing.

Definition at line 41 of file auto_initializer.hpp.

◆ is_io_context_running()

static bool unilink::builder::AutoInitializer::is_io_context_running ( )
inlinestatic

Check if IoContextManager is running.

Definition at line 54 of file auto_initializer.hpp.


The documentation for this class was generated from the following files: