On Thu, Nov 12, 2015 at 9:15 PM, Terry Reedy <tjre...@udel.edu> wrote: > On 11/12/2015 2:37 AM, Chris Angelico wrote: >> >> On Thu, Nov 12, 2015 at 5:43 PM, Christian Gollwitzer <aurio...@gmx.de> >> wrote: >>> >>> My understanding of async is that it creates an event loop. In which case >>> the loop has no chance to run within a block of code that computes >>> anything, >>> is that correct? >> >> >> This is correct. At its simplest, asynchronous code is an abstraction >> over the select() call, > > > True on Unix-derived systems, where 'select' includes the various > derivatives. It is also an abstraction over the Windows completion calls, > which are quite different. The latter is why one must generally use a > different event loop on Windows. The point is that asyncio provides an > *abstraction* such that after choosing the event loop, the rest of one's > code is os-agnostic.
I've never done that kind of thing on Windows, so I'm not sure how it works; it's still broadly based on I/O availability, right? And ultimately, it comes down to "go back to the event loop so others can run". ChrisA -- https://mail.python.org/mailman/listinfo/python-list