python multithread "maximum recursion depth exceed"

Posted by user293487 on Stack Overflow See other posts from Stack Overflow or by user293487
Published on 2010-04-26T03:43:13Z Indexed on 2010/04/26 4:03 UTC
Read the original article Hit count: 331

Filed under:
|
|
|

I use Python multithread to realize Quicksort. Quicksort is implement in a function. It is a recursive function. Each thread calls Quicksort to sort the array it has. Each thread has its own array that stores the numbers needs to be sorted. If the array size is smaller (<10,000). It runs ok. However, if the array size is larger, it shows the "maximum recursion depth exceed". So, I use setrecursionlimit () function to reset the recursion depth to 1500. But the program crash directly...

© Stack Overflow or respective owner

Related posts about python

Related posts about multithread