Hello i need to create multiple processes to query a lot of databases how do i use properly multiprocessing with web2py ?
from a simple example that works from my windows shell python example.py from multiprocessing import Pool def f(x): return x*x if __name__ == '__main__': p = Pool(5) print(p.map(f, [1, 2, 3])) apparently i´m forced to use the if __name__ =='__main__' on windows from the docs https://docs.python.org/3/library/multiprocessing.html#the-spawn-and-forkserver-start-methods ( Instead one should protect the “entry point” of the program by using if __name__ == '__main__': as follows:) With web2py how do i use multiprocessing ? regards António -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.