[Twisted-Python] Better usage of Twisted on multi core processor
Glyph Lefkowitz
glyph at twistedmatrix.com
Thu Mar 12 11:42:20 MDT 2015
> On Mar 11, 2015, at 11:57 PM, Nagy, Attila <bra at fsn.hu> wrote:
>
> Hi,
>
> On 01/20/14 15:30, Laurens Van Houtven wrote:
>> The first answer by JP Calderone (exarkun) on the following stackoverflow question may be of some assistance.
>>
>> http://stackoverflow.com/questions/10077745/twistedweb-on-multicore-multiprocessor
> What is the best way to use this capability from a .tac file?
There's nothing special about a .tac file with respect to spawning processes, it's just another way to instantiate a Service object. You just need to change the spawned process's arg list from "[executable, __file__, str(port.fileno())]" to something like "[executable, 'twistd', '-n', '-y', __file__, str(port.fileno())]".
-glyph
More information about the Twisted-Python
mailing list