Summary of threading for experienced non-Python programmers?

Diez B. Roggisch deets at nospam.web.de
Sat Mar 29 09:46:18 EDT 2008


Hrvoje Niksic schrieb:
> "Diez B. Roggisch" <deets at nospam.web.de> writes:
> 
>>> systems.  (In theory, file input/output should also be available as
>>> asynchronous code, but async IO is low-level and not available in
>>> Python.)  While threads shouldn't be considered a replacement for
>> I suggest you tell that the twisted-guys. And the ones from the
>> built-in asyncore-module.
> 
> Note that I said "*file* input/output".  Twisted and asyncore are
> about asynchronous socket programming that polls over nonblocking file
> descriptors such as found in socket programming, not about wrapping
> aio(3) and the equivalent Windows APIs.

I admit glossing over the file-input - however this is available on 
posix-systems using the select-module. So if I were in nitpicking-mood, 
your assertion still would be false - albeit having to consider 
platoform dependencies certainly is unfortunate and could be considered 
"missing".

I'm pretty sure though that tiwsted & asynchore don't poll, but instead 
use the select-module. Which at least for unix (and AFAIK for Windows as 
well) is asynchronous - you get notified if data arrives or has been 
transmitted, and otherwise your process sleeps.


Diez



More information about the Python-list mailing list