Author akira
Recipients akira, asvetlov, christian.heimes, giampaolo.rodola, josh.r, josiah.carlson, neologix, pitrou, rosslagerwall
Date 2014-04-23.18:21:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398277295.69.0.188741789762.issue17552@psf.upfronthosting.co.za>
In-reply-to
Content
> I really don't like the use_fallback argument ..

I initially also thought so. But I've suggested the parameter to replace `(was_os_sendfile_used, os_sendfile_error)` returned value as a *trade off* between a slight complexity in the interface vs. allowing to detect performance bugs easily e.g., when someone passed a file-like object incompatible with os.sendfile by accident (it is not enough to have a valid fileno. What mmap-like means?).

> .. as a user, I don't care if it's using sendfile/splice/whatever WIndows uses.
> .. what do this bring?

The reason sendfile exists is performance. Otherwise socket.makefile and shutil.copyfileobj could be used instead.

use_fallback parameter provides a way to assert that an ineffective fallback is not used by accident. It may be ignored by most users.

An alternative is a new separate public method that doesn't use the fallback.
History
Date User Action Args
2014-04-23 18:21:35akirasetrecipients: + akira, pitrou, giampaolo.rodola, christian.heimes, josiah.carlson, asvetlov, neologix, rosslagerwall, josh.r
2014-04-23 18:21:35akirasetmessageid: <1398277295.69.0.188741789762.issue17552@psf.upfronthosting.co.za>
2014-04-23 18:21:35akiralinkissue17552 messages
2014-04-23 18:21:35akiracreate