On Mittwoch, 31. August 2016 07:05:42 CEST Hartmut Kaiser wrote: > > given a server component's id_type, is it possible to retrieve the raw > > address (pointer) of the instance (on the same locality of course) ? > > Why do you think you need this? > > While retrieving the (shared_)pointer to the component implementation is > possible: > > std::shared_ptr<Component> p = hpx::get_ptr<Component>(id); > > it pins the object, i.e. the object can't be migrated anymore. Note also, > that get_ptr<>() will fail if the object referred to with 'id' is not on > the locality where the code is executed. The other caveat is that get_ptr() > might impose some overhead.
If it is only ever called once (without migration), it certainly has its benefits in terms of code (no actions required) and overheads when calling actions on a component. > > Regards Hartmut > --------------- > http://boost-spirit.com > http://stellar.cct.lsu.edu > > > _______________________________________________ > hpx-users mailing list > [email protected] > https://mail.cct.lsu.edu/mailman/listinfo/hpx-users _______________________________________________ hpx-users mailing list [email protected] https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
