[haiku-development] Re: Kernel questions: joining threads and the limited death list

  • From: looncraz <looncraz@xxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 28 Aug 2020 08:49:54 -0500

On 28/08/2020 08.15, Niels Sascha Reedijk wrote:


The question I have is this: what would be the proper way to fix this? Personally, I would propose to up the limit of MAX_DEAD_THREADS to the max number of threads (currently set to 4096)[6], with the rationale that if you can create 4096 threads, you should be able to join them after they're dead. I know that you can still hit the limit if you create more threads after some of them ended, but it sounds like a more sensible constraint. Any thoughts?


I think it would make sense to to eliminate |MAX_DEAD_THREADS entirely and just use sMaxThreads, though we could go even higher since extremely long-running highly threaded applications can potentially blast passed any limit we set... 32 seems absurdly low in any event.

The comment about sMaxThreads being arbitrarily set is also something that should eventually be remedied, though 4096 is probably good enough... for now.

--The loon
|

Other related posts: