$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] stop thread before socket destructor
From: Igor R (boost.lists_at_[hidden])
Date: 2011-04-27 18:21:32
> Now, how could I stop the thread in the server destructor so that the handle_accept is not called anymore?
You can wait until io_service::run() exits:
> Â ~stream_handler()
> Â {
> Â Â Â acceptor_.close();
//...
thread_.join();
}