[Twisted-Python] Running twistd and tac files as Windows service

Phil Mayers p.mayers at imperial.ac.uk
Wed Oct 24 11:13:09 MDT 2012


On 24/10/12 17:14, Michael Schlenker wrote:

> this looks dubious, are you sure you can still react to ServiceManager

Yes.

> actions like 'Stop' or 'Query' this way, isn't this wait() blocking?

AIUI, the "svc" methods are called from various threads?

I didn't create this code; I cribbed it from somewhere, but this was a 
long time ago (since I avoid Windows for anything other than playing games).

> If you spawn a lot of subprocess (around 100 at a time) you will
> additionally have fun with random crashes once you hit the DesktopHeap
> Memory limit.

This entire Twisted process exists to spawn processes that can only be 
run under Windows. Fortunately, the app in particular is so crappy that 
if I ever get *close* to 100 processes, I'm sure the app will die well 
before pywin does ;o)




More information about the Twisted-Python mailing list