[Twisted-Python] How to use multi-core CPU in Twisted
glyph at twistedmatrix.com
Sun Mar 25 21:52:12 EDT 2012
On Mar 25, 2012, at 9:24 PM, Peng Xiao -X (penxiao - Digital China at Cisco) wrote:
> Hi experts
> I want to use multi-core of CPU in twisted for parallel programming.
> Could anyone tell me how to archive that?
> Very thanks.
> Xiao Peng
There are many different ways, depending on your application.
Generally, some use of spawnProcess is the current best practice.
You might also want to look at a process pool, like <https://launchpad.net/ampoule> to make things a little easier.
Good luck! This is an area where there are several features in development to make it easier, but it shouldn't be too hard even today. (In the future, we hope that it will eventually be almost automatic.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python