[Twisted-Python] win32 event loop

Itamar Shtull-Trauring twisted at itamarst.org
Mon May 6 12:45:18 EDT 2002


Itamar Shtull-Trauring wrote:

> Another alternative is using threads with multiple 
> WaitForMultipleObjects. This, I would guess, is probably really slow.

I found some code that does this for windows.

Downsides:
1. C extension (although since win32 stuff comes as .exes anyway it's not so 
bad).

2. Copyright issues:
The license says " Miller Freeman, Inc. places no restrictions on the
distribution or use of this source code." It's a code sample from a magazine.

3.  It creates new threads with every call if there are more than 64 events. 
However, since it wouldn't block the GIL, and windows threads are pretty 
lightweight, this may be a decent solution.


Anyway, this suggests that perhaps I should write an externally distributed 
C module (this is probably useful for other people as well) and see how well 
it works.





More information about the Twisted-Python mailing list