diff --git a/websocketpp/config/core.hpp b/websocketpp/config/core.hpp index 69744a19db..e75102f3bd 100644 --- a/websocketpp/config/core.hpp +++ b/websocketpp/config/core.hpp @@ -91,6 +91,11 @@ struct core { /// RNG policies typedef websocketpp::random::none::int_generator rng_type; + /// Controls compile time enabling/disabling of thread syncronization + /// code Disabling can provide a minor performance improvement to single + /// threaded applications + static bool const enable_multithreading = true; + struct transport_config { typedef type::concurrency_type concurrency_type; typedef type::elog_type elog_type; @@ -98,6 +103,11 @@ struct core { typedef type::request_type request_type; typedef type::response_type response_type; + /// Controls compile time enabling/disabling of thread syncronization + /// code Disabling can provide a minor performance improvement to single + /// threaded applications + static bool const enable_multithreading = true; + /// Default timer values (in ms) /// Length of time to wait for socket pre-initialization diff --git a/websocketpp/config/core_client.hpp b/websocketpp/config/core_client.hpp index b7329756b8..4660952f87 100644 --- a/websocketpp/config/core_client.hpp +++ b/websocketpp/config/core_client.hpp @@ -92,6 +92,11 @@ struct core_client { typedef websocketpp::random::random_device::int_generator rng_type; + /// Controls compile time enabling/disabling of thread syncronization code + /// Disabling can provide a minor performance improvement to single threaded + /// applications + static bool const enable_multithreading = true; + struct transport_config { typedef type::concurrency_type concurrency_type; typedef type::elog_type elog_type; @@ -99,6 +104,11 @@ struct core_client { typedef type::request_type request_type; typedef type::response_type response_type; + /// Controls compile time enabling/disabling of thread syncronization + /// code Disabling can provide a minor performance improvement to single + /// threaded applications + static bool const enable_multithreading = true; + /// Default timer values (in ms) /// Length of time to wait for socket pre-initialization diff --git a/websocketpp/config/debug.hpp b/websocketpp/config/debug.hpp index 0f2fc65c89..73b6e39efe 100644 --- a/websocketpp/config/debug.hpp +++ b/websocketpp/config/debug.hpp @@ -92,6 +92,11 @@ struct debug_core { /// RNG policies typedef websocketpp::random::none::int_generator rng_type; + /// Controls compile time enabling/disabling of thread syncronization + /// code Disabling can provide a minor performance improvement to single + /// threaded applications + static bool const enable_multithreading = true; + struct transport_config { typedef type::concurrency_type concurrency_type; typedef type::elog_type elog_type; @@ -99,6 +104,11 @@ struct debug_core { typedef type::request_type request_type; typedef type::response_type response_type; + /// Controls compile time enabling/disabling of thread syncronization + /// code Disabling can provide a minor performance improvement to single + /// threaded applications + static bool const enable_multithreading = true; + /// Default timer values (in ms) /// Length of time to wait for socket pre-initialization