Subject: Re: [boost] [RPC] Boost.Asio to write *concurrency ready* code
From: microcai (microcaicai_at_[hidden])
Date: 2013-08-28 00:48:18
2013/8/28 Niall Douglas <s_sourceforge_at_[hidden]>:
> On 27 Aug 2013 at 12:00, boost-request_at_[hidden] wrote:
>> I am *not sure* if anyone else has made such discovery, anyway,
>> comment is welcomed.
> What you have discovered is well known I am afraid. Indeed, proposed
> Boost.AFIO from this year's GSoC implements an asynchronous chainable
> closure execution engine on ASIO, and you can read documentation on
> how AFIO is equivalent to Google's and Microsoft's WG21 closure
> execution engine proposals here:
> Paul did up a great matrix mapping APIs from those engines to AFIO
> equivalents at
> If we get time before GSoC closes, we may just go ahead and implement
> using AFIO as it would be incredibly trivial to do so. However, the
> Boost community only voted closure execution support as third most
> important - they ranked directory change monitoring as highest, so
> that's what me and Paul are implementing now.
> (FYI to those interested, we're going to deliver some *seriously*
> performant directory monitoring. Testing of our direct kernel syscall
> based implementation
> suggests watching a 1 million file entry directory for changes will
> work on Windows, albeit pegging a 3.5Ghz 4 core machine at 75-85% of
> all CPUs.
> Linux sadly lacks the syscalls to match Windows, but a 100,000 entry
> directory may well work just fine)
After digging into the proposed Boost.Afio library, I am afraid that
not* meet my standard of what a *good* library is.
Boost.Afio seems to support both async and sync operation, but
obversely they failed
to design the proper API. Boost.Afio relay on Boost.Asio, but they
seems to ignore the
elegant Asio Style. They didn't even understand what makes Boost.Asio
a good library.
A good library is not about good features (although its importand) but
about element API.
For async file I/O, the asio style API like this
file.async_open("test.txt", "r", & handle_open );
that is way more powerfull that the complex
The api that Boost.Afio choose is too complex yet too stupid.
You might argue on me that the job which Boost.Afio tries to solve is
complex, but that doesn't be a good excuse to design such stupid API.
Boost.Afio is stupid.
As the "closure execution engine", Boost.Asio already have that, there
is absolutly no point in investigating yet another Boost.Asio for what
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk