How to achive true parallelism with thread in Python?
问题 I'm learning about threading library in Python. I don't understand, how to run two threads in parallel? Here are my python programs: Program without threading ( fibsimple.py ) def fib(n): if n < 2: return n else: return fib(n-1) + fib(n-2) fib(35) fib(35) print "Done" Running time: $ time python fibsimple.py Done real 0m7.935s user 0m7.922s sys 0m0.008s Same program with threading( fibthread.py ) from threading import Thread def fib(n): if n < 2: return n else: return fib(n-1) + fib(n-2) t1 =