SObjectizer-5 Extra
Namespaces | Functions
so_5::extra::env_infrastructures::asio::simple_mtsafe Namespace Reference

Namespaces

 impl
 

Functions

environment_infrastructure_factory_t factory (::asio::io_context &io_svc)
 A factory for creation of environment infrastructure based on Asio's event loop. More...
 

Function Documentation

◆ factory()

environment_infrastructure_factory_t so_5::extra::env_infrastructures::asio::simple_mtsafe::factory ( ::asio::io_context &  io_svc)
inline

A factory for creation of environment infrastructure based on Asio's event loop.

Attention
This environment infrastructure is not a thread safe.

Usage example:

int main()
{
asio::io_context io_svc;
so_5::launch( [](so_5::environment_t & env) {
... // Some initialization stuff.
},
[&io_svc](so_5::environment_params_t & params) {
params.infrastructure_factory( asio_env::factory(io_svc) );
} );
return 0;
}
Examples:
env_infrastructures/asio/resolve_interactive/main.cpp.

Definition at line 661 of file simple_mtsafe.hpp.