Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add hpx::start nullptr overloads #3127

Merged
merged 7 commits into from Jan 30, 2018

Conversation

msimberg
Copy link
Contributor

Proposed Changes

Adds overloads so that passing nullptr to hpx::start will only start up the runtime.

This also adds a missing line to the docstrings of some hpx::start overloads.

Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add equivalent overloads to hpx::init()?

@msimberg msimberg changed the title Add hpx::start nullptr overloads Add hpx::start nullptr overloads Jan 25, 2018
@msimberg
Copy link
Contributor Author

Added overloads to hpx::init as well. Thanks for pointing that out.

@msimberg msimberg mentioned this pull request Jan 25, 2018
@@ -705,6 +707,18 @@ namespace hpx
inline int init(util::function_nonser<int(int, char**)> const& f,
int argc, char** argv, std::vector<std::string> const& cfg,
hpx::runtime_mode mode = hpx::runtime_mode_default);

/// \cond NOINTERNAL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's your rationale not to document the new overloads? Do you intend to deliberately leave them 'undocumented' (in the sense that the user is not supposed to use them)?

@msimberg
Copy link
Contributor Author

msimberg commented Jan 27, 2018 via email

@hkaiser
Copy link
Member

hkaiser commented Jan 27, 2018

As a user, would you prefer to see the nullptr overloads explicitly documented with separate entries or to have the nullptr behaviour documented in the existing entries?

Having it documented as a special case with the other overloads would be preferred, I think. Something like: if f is nullptr no hpx_main will be invoked.

Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot!

@msimberg
Copy link
Contributor Author

I also added a further note about hpx_main not being called when using the start/init(function, ...) overloads.

@msimberg msimberg merged commit dbc085f into STEllAR-GROUP:master Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants