Subject: Re: [boost] [afio] Formal review of Boost.AFIO
From: Thomas Heller (thom.heller_at_[hidden])
Date: 2015-08-31 10:50:26
On 08/31/2015 04:25 PM, Niall Douglas wrote:
> On 31 Aug 2015 at 1:38, Thomas Heller wrote:
>> On 08/30/2015 10:06 PM, Niall Douglas wrote:
>>> 7. future.wait() very rarely blocks in your use scenario i.e. most if
>>> not nearly all the time the future is ready. If you are blocking, the
>>> cost of any thread sleep will always dwarf the cost of any future.
>> Is this really an assumption that holds when dealing with operations
>> that do file I/O? I have a hard time believing this is the general case.
> Imagine the copying of a 10Mb file in 1Mb segments. You would create
> a minimum of 11 future-promise pairs, and only wait on the very last
> My own benchmarking here suggested that (much) lighter weight futures
> would let me implement a much more efficient ASIO reactor than ASIO's
> and push all potential blocking to outside AFIO, perhaps right down
> to the final end user layer. Perhaps thousands of future-promise
> pairs might be created, continued from and destroyed between actual
> thread blocks. This is why I believe - currently without real world
> proof - this ought to be a big win.
How does this answer my question?
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Thomas Heller Friedrich-Alexander-Universität Erlangen-Nürnberg Department Informatik - Lehrstuhl Rechnerarchitektur Martensstr. 3 91058 Erlangen Tel.: 09131/85-27018 Fax: 09131/85-27912 Email: thomas.heller_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk