I believe that the strategy used in http:server::Server to shutdown
the acceptor(s) is not thread safe.

Although the handleStop function is called through the io_service
event loop, there is no guarantee that handleStop and
handle(Tcp|Ssl)Accept can't be called concurrently by different
threads. To have such guarantee one should enqueue both handlers
through an Asio "strand".

Without such guarantee, one might end up having two threads calling
close and async_accept on the same acceptor object, which is not
thread-safe, according to the Asio documentation.


Max

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to