[Python-Dev] Trial balloon: microthreads library in stdlib (original) (raw)

Josiah Carlson jcarlson at uci.edu
Mon Feb 12 21:38:06 CET 2007


"Martin v. Löwis" <martin at v.loewis.de> wrote:

Richard Tew schrieb: > but at that stage I need to > poll two different resources for events. In order to avoid this it makes > sense to stop using asyncore for sockets and to write a new > replacement socket object based on IO completion ports.

I don't know whether/how this is possible. The underlying WaitForMultipleObjects routine does not accept WinSock objects, to my knowledge (perhaps it does in Vista, with the rewriting of WinSock?).

It "works" in Windows 2000. I've got a variant of a prototype (and abandoned) Twisted Reactor that uses WaitForMultipleObjects for an alternate asyncore.poll() implementation on Windows. It sucks up 100% processor when sending trivial amounts of data from a single socket (where asyncore uses about 2%), but you do get the data.



More information about the Python-Dev mailing list