Boost logo

Boost :

Subject: Re: [boost] [fiber] Suggestions regarding asio
From: Klemens Morgenstern (klemens.morgenstern_at_[hidden])
Date: 2016-09-25 13:54:42


Am 25.09.2016 um 16:17 schrieb Tatsuyuki Ishi:
> Hmm, this is a little off-topic, but I'd like to describe I'm now searching
> for an alternative and why.
>
> Asio sucks in the following point:
> Its design is incapable to save system calls by doing a batch poll.
What exactly to you mean by that? You can either use a coroutine to
achieve exactly that or build a simple class which polls and posts the
task on the io_service.

> Its design doesn't allow the user to specify a timeout, which is essential
> in suspend_until.
You can use a timer and either cancel the IO-Object or the io_service.
> It lacks of useful things for a coroutine-based system like filesystem
> operations.
What exactly? Why not use coroutines!?
>
> An full featured alternative is libuv, however it lacks the direct yielding
> hooks, and has a different design especially on stream reading from asio.
>
> Maybe I will get patching into asio. I'm just sending for some commence.
I guess you mean comments. :D
What I would keep in mind is, that the Networking TS, which will
probably move into the C++ Standard at some point. Maybe you should
consider writing a library which uses boost.asio and just built atop it.

Or maybe what you need to do can be done by boost.afio
(https://github.com/ned14/boost.afio) . Niall Douglas is working on that
one, he's rather active on the mailing list, so you can surely ask him
if he needs help.
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk