@@ -324,7 +324,7 @@ class connection : public config::socket_type::socket_con_type {
324324 );
325325
326326 if (config::enable_multithreading) {
327- new_timer->async_wait (m_strand-> wrap ( lib::bind (
327+ new_timer->async_wait (lib::asio::bind_executor (*m_strand, lib::bind (
328328 &type::handle_timer, get_shared (),
329329 new_timer,
330330 callback,
@@ -635,7 +635,7 @@ class connection : public config::socket_type::socket_con_type {
635635 lib::asio::async_write (
636636 socket_con_type::get_next_layer (),
637637 m_bufs,
638- m_strand-> wrap ( lib::bind (
638+ lib::asio::bind_executor (*m_strand, lib::bind (
639639 &type::handle_proxy_write, get_shared (),
640640 callback,
641641 lib::placeholders::_1
@@ -718,7 +718,7 @@ class connection : public config::socket_type::socket_con_type {
718718 socket_con_type::get_next_layer (),
719719 m_proxy_data->read_buf ,
720720 " \r\n\r\n " ,
721- m_strand-> wrap ( lib::bind (
721+ lib::asio::bind_executor (*m_strand, lib::bind (
722722 &type::handle_proxy_read, get_shared (),
723723 callback,
724724 lib::placeholders::_1, lib::placeholders::_2
@@ -856,7 +856,7 @@ class connection : public config::socket_type::socket_con_type {
856856 socket_con_type::get_socket (),
857857 lib::asio::buffer (buf,len),
858858 lib::asio::transfer_at_least (num_bytes),
859- m_strand-> wrap ( make_custom_alloc_handler (
859+ lib::asio::bind_executor (*m_strand, make_custom_alloc_handler (
860860 m_read_handler_allocator,
861861 lib::bind (
862862 &type::handle_async_read, get_shared (),
@@ -925,7 +925,7 @@ class connection : public config::socket_type::socket_con_type {
925925 lib::asio::async_write (
926926 socket_con_type::get_socket (),
927927 m_bufs,
928- m_strand-> wrap ( make_custom_alloc_handler (
928+ lib::asio::bind_executor (*m_strand, make_custom_alloc_handler (
929929 m_write_handler_allocator,
930930 lib::bind (
931931 &type::handle_async_write, get_shared (),
@@ -965,7 +965,7 @@ class connection : public config::socket_type::socket_con_type {
965965 lib::asio::async_write (
966966 socket_con_type::get_socket (),
967967 m_bufs,
968- m_strand-> wrap ( make_custom_alloc_handler (
968+ lib::asio::bind_executor (*m_strand, make_custom_alloc_handler (
969969 m_write_handler_allocator,
970970 lib::bind (
971971 &type::handle_async_write, get_shared (),
@@ -1030,7 +1030,7 @@ class connection : public config::socket_type::socket_con_type {
10301030 */
10311031 lib::error_code interrupt (interrupt_handler handler) {
10321032 if (config::enable_multithreading) {
1033- lib::asio::post (m_io_context->get_executor (), m_strand-> wrap ( handler));
1033+ lib::asio::post (m_io_context->get_executor (), lib::asio::bind_executor (*m_strand, handler));
10341034 } else {
10351035 lib::asio::post (m_io_context->get_executor (), handler);
10361036 }
@@ -1039,7 +1039,7 @@ class connection : public config::socket_type::socket_con_type {
10391039
10401040 lib::error_code dispatch (dispatch_handler handler) {
10411041 if (config::enable_multithreading) {
1042- lib::asio::post (m_io_context->get_executor (), m_strand-> wrap ( handler));
1042+ lib::asio::post (m_io_context->get_executor (), lib::asio::bind_executor (*m_strand, handler));
10431043 } else {
10441044 lib::asio::post (m_io_context->get_executor (), handler);
10451045 }
0 commit comments