Message217082
> 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. |
|
Date |
User |
Action |
Args |
2014-04-23 18:21:35 | akira | set | recipients:
+ akira, pitrou, giampaolo.rodola, christian.heimes, josiah.carlson, asvetlov, neologix, rosslagerwall, josh.r |
2014-04-23 18:21:35 | akira | set | messageid: <1398277295.69.0.188741789762.issue17552@psf.upfronthosting.co.za> |
2014-04-23 18:21:35 | akira | link | issue17552 messages |
2014-04-23 18:21:35 | akira | create | |
|