[Twisted-web] Question regarding callLater() and service creation

Eric Chamberlain Eric.Chamberlain at zonarsystems.com
Thu Mar 10 00:50:18 EST 2011

I'm creating a service using Twisted.  It has nothing to do with networking (I know that Twisted is an event-driven networking engine... stay with me here :).  It's simply polling a database every 30 seconds.  I'm using callLater() once the work has been completed.  My question is does the reactor spawn a new thread once the callLater() timeout has been reached?  If so, this would mean that the work being done may be effected by the GIL, correct?

I may make more services like this where Twisted is used to create the service.  These services may do a lot of heavy lifting... and may have nothing to do with networking.  However, I like the fact that Twisted gives me a base for creating services.  I also like the fact that if I do any network related services I'm using the same lib... which will use the same method to launch the service, etc.

Even with all of these pros I still feel like I may be using the wrong tool for the job.  Maybe I answered my own question... for non-network related services, services that will do a lot of heavy lifting, etc. fork a process (there are plenty of classes out there that daemonize scripts easily enough) and use Twisted for all event-driven networking related services.

I'd be interested to know what you guys think.  Thanks in an advance!

Eric Chamberlain

Confidentiality Notice: This e-mail may contain proprietary information some of which may be legally privileged. It is for the intended recipient(s) only. If you believe that it has been sent to you in error, please notify the sender by reply e-mail and delete the message. Any disclosure, copying, distribution or use of this information by someone other than the intended recipient(s) is prohibited and may be unlawful.

More information about the Twisted-web mailing list