[Twisted-Python] Multiple thread pools

Stéphane Brault stephane_brault at yahoo.fr
Thu May 11 09:32:08 MDT 2006


Hi,
 I can see now how 'untwisted' my threads concerns are, please forget my newbie ununderstanding ;-) 
 Still, I need to ensure that I won't have more than x similar calls at a time. 
 Is there a way, maybe using some of the deferred classes (deferredqueue,..)
 to ensure that there is no more than x simultaneous similar calls (wrapped in deferreds), the others being pending,
 until one is finished. My question might be stupid, but I'm quite new to twisted and the way to implement
 this behaviour is not clear to me (even if I found great help in the o'reilly book and the docs).
 
 Thanks,
 
 Stéphane

----- Message d'origine ----
De : Stéphane Brault <stephane_brault at yahoo.fr>
À : twisted-python at twistedmatrix.com
Envoyé le : Mercredi, 10 Mai 2006, 12h27mn 16s
Objet : [Twisted-Python] Multiple thread pools

Hi,
 I want to use twisted to run a server that is also a SOA client:
 I developp a scheduler that schedule calls to a web service regularly, tasks may be added or terminated.
 The web service has different calls and each task calls a specific call (too many calls in that sentence ;-)) and then update a database.
 The fact is that I can only have a maximum number of thread per call, I was wondering if I could have a thread pool per type of call,
 feeding it with my scheduled tasks and being able to change its size dynamically.
 I was thinking of having different groups of tasks, depending of the specific call, and feeding my thread pool according to the schedule.
 I'm new to twisted, so I don't really know how to do that, the thread documentation is a bit light for me.
 I'm also not quite sure what type of reactor would be best to use.
 
 I hope I've been clear, thanks,
 
 Stéphane



_______________________________________________
Twisted-Python mailing list
Twisted-Python at twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python







More information about the Twisted-Python mailing list