|
Boost Users : |
Subject: Re: [Boost-users] [asio] Custom asynchronous service
From: Acer Yang (yangacer_at_[hidden])
Date: 2012-10-16 00:13:52
On Wed, Oct 3, 2012 at 5:54 AM, Boris Schaeling <boris_at_[hidden]> wrote:
> On Tue, 02 Oct 2012 10:24:59 +0200, Acer Yang <yangacer_at_[hidden]> wrote:
>
> Hi all,
>>
>> I would like to adapt my class to asio for offering
>> async_do_something(param, callback) interfaces.
>> [...]Do I have other choices? All suggestions are welcome.
>>
>
> I'm not entirely sure what you are trying to do. But maybe this helps a
> bit: I explained at <
> http://en.highscore.de/cpp/boost/asio.html#asio_extensions> how to create
> your own Boost.Asio I/O service. I also gave a presentation once about the
> different possibilities - see <
> https://github.com/boostcon/2011_presentations/raw/master/wed/creating_boost_asio_extensions.pdf
> >.
>
> Boris
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Hi Boris,
Following your example, I have written my own extension. I found that when
I register signal handler for shutdown my application
manually, the application required ctrl-C twice to be shutdown. Then I go
back to check the example, adding the same signal
handler - it acted the same way. Should I book all io_service(s) for stop
them externally?
Here is a the example modified that uses sleep() rather than Windows API.
http://gais4.cs.ccu.edu.tw/~yangacer/asio_ext.tar.gz
Best wishes,
Acer.
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