Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost.asio] Concurrently Ping 1000+ Hosts
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2013-12-19 19:10:22

On 19 Dec 2013 at 8:17, Oliver Kowalke wrote:

> // fiber gets suspended until message was read
> boost::asio::async_read(
> socket_,
> boost::asio::buffer( channel),
> yield[ec]);
> if ( ec) throw std::runtime_error("some error");
> // fiber gets suspended until message was written
> boost::asio::async_write(
> socket_,
> boost::asio::buffer( data_, max_length),
> yield[ec]);
> You can find more detailed infos in boost.fiber's docu:
> The library itself contains several examples demonstrating the usage
> together with boost.asio.

You just made me VERY interested in the forthcoming Fiber peer
review, thank you. AFIO's third worked example in its tutorial is a
peak performance "find in files" implementation and it, being
completely asynchronous right down to even enumerating directories,
is a mess of callbacks. I had assumed that was as good as it could

It looks possible that Fiber could replace much of that mess of
callbacks with something far more readable. You definitely have my
attention now, I may even have a crack at adding Fiber support to
AFIO, and see what happens. One again, thank you.


Currently unemployed and looking for work.
Work Portfolio:

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at