Skip to content

Conversation

@goldwaving
Copy link
Contributor

Please considering mentioning DEFAULT_PTHREAD_STACK_SIZE alongside STACK_SIZE in the runtime error reporting. DEFAULT_PTHREAD_STACK_SIZE is not well documented. Anyone using pthreads will waste a lot of time trying to figure out why their code is failing (I know I did).

Please considering mentioning DEFAULT_PTHREAD_STACK_SIZE alongside STACK_SIZE in the runtime error reporting.  DEFAULT_PTHREAD_STACK_SIZE is not well documented.  Anyone using pthreads will waste a lot of time trying to figure out why their code is failing (I know I did).
@sbc100
Copy link
Collaborator

sbc100 commented Jan 5, 2023

Ah, sorry about that. When I made that change my indent was to have DEFAULT_PTHREAD_STACK_SIZE default to the same value as STACK_SIZE. I'm not sure how I missed that part of the change when I landed #18191.

The idea is that setting -sSTACK_SIZE should also set -sDEFAULT_PTHREAD_STACK_SIZE so it should not be needed. I'll see if I can make a change that effect now.

@goldwaving
Copy link
Contributor Author

Thanks for the reply. That makes sense.

sbc100 added a commit that referenced this pull request Jan 9, 2023
This was always my intention with #18191 but somehow it got left out.  I
think it makes sense that user to override `STACK_SIZE` also, by
default, override the pthread stack size.  Such users can always
explicitly set the pthread stack size if they don't want this behaviour.

See #18472
sbc100 added a commit that referenced this pull request Jan 9, 2023
This was always my intention with #18191 but somehow it got left out.  I
think it makes sense that user to override `STACK_SIZE` also, by
default, override the pthread stack size.  Such users can always
explicitly set the pthread stack size if they don't want this behaviour.

See #18472
sbc100 added a commit that referenced this pull request Jan 9, 2023
This was always my intention with #18191 but somehow it got left out.  I
think it makes sense that user to override `STACK_SIZE` also, by
default, override the pthread stack size.  Such users can always
explicitly set the pthread stack size if they don't want this behaviour.

See #18472
sbc100 added a commit that referenced this pull request Jan 9, 2023
This was always my intention with #18191 but somehow it got left out.  I
think it makes sense that user to override `STACK_SIZE` also, by
default, override the pthread stack size.  Such users can always
explicitly set the pthread stack size if they don't want this behaviour.

See #18472
sbc100 added a commit that referenced this pull request Jan 9, 2023
This was always my intention with #18191 but somehow it got left out.  I
think it makes sense that user to override `STACK_SIZE` also, by
default, override the pthread stack size.  Such users can always
explicitly set the pthread stack size if they don't want this behaviour.

See #18472
@sbc100
Copy link
Collaborator

sbc100 commented Jan 9, 2023

Hopefully this is fixed in #18479 and we can close this?

@goldwaving
Copy link
Contributor Author

Sounds good.

@sbc100 sbc100 closed this Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants