Hi Igor!
What do you mean by "use strands". I'm using strands for my completion
handlers. Also I can use strand to commit async operations and to post
close(). But that fact doesn't help given that the second buffer write
(from my scenario) is not initiated from within the same strand. It
seems that some internal boost strand is used to commit second and
later buffer writes when using scatter-gather async_write API. So the
question "how to safely close socket?" still remains.
2013/3/6 Igor R
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/stran... _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users