|
Boost Users : |
Subject: Re: [Boost-users] AsIO daytime example needs terminate code
From: Boris Schaeling (boris_at_[hidden])
Date: 2010-04-28 12:54:19
On Wed, 28 Apr 2010 16:23:43 +0200, Christopher Yeleighton
<giecrilj_at_[hidden]> wrote:
> [...]Of course this works for the synchronous server where there is an
> explicit loop;
> an asynchronous server needs to call { service->stop(); } My experiment
> shows
> that it is does not produce any visible failure under SuSE; however, it
> is not
> clear whether io_service::stop can be called from within a signal
> handler.
It's not safe to call io_service::stop in a signal handler (io_service is
thread-safe; there are Pthread functions called in io_service::stop which
are not safe to call in signal handlers).
Boris
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net