$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] asio: async ops in multithreading environment
From: Igor R (boost.lists_at_[hidden])
Date: 2013-03-06 06:21:36
> The problem is: second write which is issued internally by boost
> cannot be protected by the same mutex which is used for protected
> access to the socket in my code.
>
> So, the question is: how can I safely close the socket?
You should use strands:
http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio/overview/core/strands.html