[Twisted-Python] Better usage of Twisted on multi core processor

Nagy, Attila bra at fsn.hu
Fri Mar 13 04:03:02 MDT 2015


On 03/12/15 18:42, Glyph Lefkowitz wrote:
>> 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())]".
>
Sounds logical. Do you plan a nicer interface for this maybe? :)




More information about the Twisted-Python mailing list