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

Create hpx::get_ptr<>() allowing to access component implementation #858

Closed
hkaiser opened this issue Sep 18, 2013 · 1 comment
Closed
Assignees
Labels
category: components difficulty: easy Good issues for starting out with HPX development type: enhancement
Milestone

Comments

@hkaiser
Copy link
Member

hkaiser commented Sep 18, 2013

Add an API function

template <typename Component>
boost::shared_ptr<Component> get_ptr(id_type);

which returns a pointer to the underlying component instance represented by the given id. The returned shared_ptr needs to perform several implicit operations:

  • hold the referenced component alive
  • 'lock' the component instance, preventing it from being migrated.

This function will return a valid pointer only if the component instance is currently located on the requesting locality. It should report an error otherwise.

@ghost ghost assigned hkaiser Sep 18, 2013
@hkaiser
Copy link
Member Author

hkaiser commented Sep 21, 2013

This has now changed to the following interface:

template <typename Component>
hpx::future<boost::shared_ptr<Component> > hpx::get_ptr(hpx::naming::id_type const& id);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: components difficulty: easy Good issues for starting out with HPX development type: enhancement
Projects
None yet
Development

No branches or pull requests

1 participant