Skip to content

Require nThreads to be a sane value #23

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cactorium
Copy link

This causes all kinds of interesting undefined behavior if nThreads is zero here

@luca-nardelli
Copy link
Contributor

Thanks for pointing that out! Actually, I think it would be better to throw an exception if nThreads <= 0, since this is definitely something that shouldn't happen, and forcing the value to 1 silently doesn't seem the best thing to do to me.

@cactorium
Copy link
Author

No problem! Does an assertion work better?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants