From c27ec6f57b7d8844456c14a5721489071f5ec1a3 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 24 Sep 2014 00:40:56 +0900 Subject: [PATCH] doc: Add doc how to enable multi threading in libnghttp2_asio --- doc/sources/libnghttp2_asio.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/sources/libnghttp2_asio.rst b/doc/sources/libnghttp2_asio.rst index 4caa1b0d..e358399a 100644 --- a/doc/sources/libnghttp2_asio.rst +++ b/doc/sources/libnghttp2_asio.rst @@ -157,3 +157,17 @@ When client requested "/", we push "/my.css". To push resource, call ``nghttp2::asio_http2::server::request::push`` function with desired method and path. Later, the callback will be called with the pushed resource "/my.css". + +Enable multi-threading +++++++++++++++++++++++ + +Enabling multi-threading is very easy. Just call +``nghttp2::asio_http2::server::http2::num_threads`` function with the +desired number of threads: + +.. code-block:: cpp + + http2 server; + + // Use 4 native threads + server.num_threads(4);