Jump to content

Search the Community

Showing results for tags 'recursion'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 2 results

  1. I have some inherited code that does some complex maths using a recursive function (i.e the function calls itself). Last night a customer had a situation where running the routine killed the app. My belief is that the app ran out of stack space due to this routine calling itself multiple times and thus died. Is there anyway to detect this is likely to happen so that the code can be aborted with a message instead? David
  2. 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?
×