etc.curl: Formal review begin

dsimcha dsimcha at yahoo.com
Tue Aug 30 12:35:54 PDT 2011


== Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s article
> On 8/30/11 1:10 PM, Jonathan M Davis wrote:
> > std.file.copy is synchronous. Would the suggestion then be to change it to be
> > asynchronous or to create a second function (e.g. copyAsync) which does an
> > asynchrous copy?
> I think std.file.copy should do whatever the heck is best to copy a
> file. As such, it should be transparently asynchronous. It would be
> great if such a task caught your fancy - and don't forget to test speed
> under a few circumstances.
> Andrei

What about std.file.byLine and byChunk?  IMHO these should be augmented, not
replaced, by byLineAsync and byChunkAsync.  There's some extra cost associated
with doing this asynchronously (you need multiple buffers and you need to fire up
a thread unless you have the user provide a TaskPool) and probably some tuning
options that should be exposed.  Furthermore, byLine and byChunk are inherently
lower level than copy and therefore control is more important and simplicity less
important.


More information about the Digitalmars-d mailing list