> On Jul 6, 2017, at 8:42 AM, Steve Mills <sjmi...@mac.com> wrote: > > Why can't you spawn your own thread to do the recursive code? Create the > NSThread, set its stack size, light its fuse to do the processing, and delete > it.
This. Although I would also consider looking at your code to see if it can be refactored to avoid using recursion; a recursive algorithm can always be turned into an iterative one that uses a (growable) stack data structure to hold state. Unbounded recursion can be dangerous, especially when it’s operating on external data. If you do stick with the custom-thread approach, consider putting in an explicit recursion-depth check in your code so you can abort it cleanly before blowing up the stack. —Jens _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com