| ▲ | gpderetta 9 hours ago | |||||||||||||||||||
Think about it, what does it means for a file to be ready? Socket and pipes are a stream abstraction: To be ready it means that there is data to read or space to write. But for files data is always available to read (unless the file is empty) or write (unless the disk is full). Even if you somehow interpret readiness as the backing pages being loaded in the page cache, files are random access so which pages (ie which specific offset and length) you are interested in can't be expressed via a simple fd based poll-like API (Linux tried to make splice work for this use case, but it didn't work out). | ||||||||||||||||||||
| ▲ | stingraycharles 9 hours ago | parent [-] | |||||||||||||||||||
Don’t block devices have a scheduler with a queue under the hood? Couldn’t that queue become full when writing? (This is a genuine question) | ||||||||||||||||||||
| ||||||||||||||||||||