Thanks for pointing that out. Is there a dead simply example on how to parallelize a function using ampoule. Again, I have a function.. I have a for loop.. the function takes in an argument from loop.. but the for loop is extremely parallelizable.
Also, I was going thru this awesome twisted tutorial from pycon 2107 ( https://www.youtube.com/watch?v=ztkBG4qLR_4) I found couple of use features. (defer.ensureDeferred and defer.gatherResults ) Can these two be used instead of deferToThread. When are the above defered used and when to use deferToThread. Thanks for entertaining my dumb questions. On Mon, Jun 24, 2019 at 1:28 AM Gelin Yan <dynami...@gmail.com> wrote: > Hi > > If your purpose is merely not to block the reactor, you can run your > code in a separate thread by using deferToThread. If you want to benefit > from multi cores, you may consider use https://github.com/twisted/ampoule > or other similar tools. > > Regards > > gelin yan > _______________________________________________ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python >
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python