Re: Increasing stack size of NSDocument's open file thread
Re: Increasing stack size of NSDocument's open file thread
- Subject: Re: Increasing stack size of NSDocument's open file thread
- From: Alastair Houghton <email@hidden>
- Date: Thu, 6 Jul 2017 17:00:17 +0100
On 6 Jul 2017, at 16:33, Graham Cox <email@hidden> wrote:
>
> I appreciate your answer, and I realise there’s no API that could set the
> stack size after the thread is created.
>
> But presumably the stack size of the thread is set somewhere as a parameter
> to the thread when it’s created - certainly if I create a thread myself it’s
> one of the attributes. So the question is is there a way to set up a value
> that NSDocumentController will use when opening a file? The default stack
> size seems very small, considering that dearchiving can be quite recursive in
> nature.
Disassembling it, it looks to me as if NSDocumentController uses GCD, and I
don’t think there’s any way to set the stack size for threads created by GCD
(correct me if I’m wrong). I imagine this used to be an ever bigger problem in
the past - IIRC when Mac OS X originally shipped, threads other than the main
thread had *very* small stacks by default.
> I understand the hack you posted, but there’s no way I’m going there, sorry ;)
:-D Not surprised. It may well be the only way without rewriting the code to
not use recursion, however.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden