Boost logo

Boost Users :

Subject: [Boost-users] AsIO daytime example needs terminate code
From: Christopher Yeleighton (giecrilj_at_[hidden])
Date: 2010-04-28 08:34:29


Regarding Daytime.3 - An asynchronous TCP daytime server: [1]

There is no way to stop this server! I can kill it under Linux but then it
aborts instead of exiting, which is in general not good.

== My solution ==
Add a global quit event variable.
Handle the QUIT signal by setting the quit event.
Test for the quit event within the event loop.

Thoughts?

== References ==
[1]
http://www.boost.org/doc/libs/1_42_0/doc/html/boost_asio/tutorial/tutdaytime3.html


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