[Python-ideas] non-blocking buffered I/O
Steve.Dower at microsoft.com
Tue Oct 30 17:27:37 CET 2012
Greg Ewing wrote:
> Steve Dower wrote:
>> For example, (library) code that needs a socket to be ready can ask
>> the current scheduler if it can do "select([sock], , )",
> I think you're mixing up the scheduler and event loop layers here. If the scheduler
> is involved in this at all, it would only be to pass the request on to the event loop.
Could you clarify for me what goes into each layer? I've been treating "scheduler" and "event loop" as more-or-less synonyms (I see an event loop as one possible implementation of a scheduler).
If you consider the scheduler to be the part that calls __next__() on the generator and sets up callbacks, that is implemented in my _Awaiter class, and should never need to be touched.
Possibly the difference in terminology comes out because I'm not treating I/O specially? As far as wattle is concerned, I/O is just another operation that will eventually call Future.set_result(). I've tried to capture this in my write-up: https://bitbucket.org/stevedower/wattle/wiki/Proposal
More information about the Python-ideas