Search the Community
Showing results for tags 'recursion'.
Found 1 result
I've written several multi-threaded programs with the parallel library, usually using tasks but one or two using parallel for. I have a new one that is more natural for parallel for. The problem is that this is the first one that must use recursion. Inside the loop there is some initial stuff and then it calls a procedure that calls itself, and that isn't working. If the parallel loop only has one iteration, e.g. parallel.for(1,1 ... ) or parallel.for(2,2 ... ), it works. But for actual work, with the recursion and parallel.for, it locks up. How can I get a recursive procedure to work in a multi-threaded program?