[Twisted-Python] Calling into Twisted from a Windows service control

Steve Freitas sflist at ihonk.com
Thu Feb 8 13:35:03 EST 2007


Itamar posted earlier in this list how to run Twisted as a service:


Now, I want to trap some Windows events and make some calls into my
Twisted app (calling disconnect() on a pb.PBClientFactory instance is
one example). I'll be setting up the trapping in the service code above,
though, so from looking at the howtos, it looks like the right thing for
me to do when I get some event is:


The docs state, though, that the callable must be thread safe. Does that
mean I need to use threadable.synchronize() to put a lock around
factory.disconnect? Or whatever else I'm calling into?


More information about the Twisted-Python mailing list