hpx::supervision::remove_target#
Defined in header hpx/supervision.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
See also:
-
hpx::future<void> hpx::supervision::remove_target(hpx::id_type const &locality, hpx::id_type const &target)#
Clear all locally tracked state for a target on a possibly remote locality.
Unlike unregister_observer(), which removes a single previously registered observer handle, remove_target() unconditionally forgets every piece of local state held for target - its recorded lifecycle state (see publish_event() / query_state()) and any observers still registered for it (see register_observer()) - regardless of any specific observer handle.
Note
This is intended for callers that know target will never be queried or observed again locally (e.g. after a failed registration that seeded some state for it, or once a peer has been evicted), so that local state does not accumulate indefinitely. It is not itself a lifecycle event and does not affect target’s state on any other locality.
- Parameters
locality – [in] The locality on which target’s state is tracked.
target – [in] The actor (or component) whose locally tracked state should be removed.
- Throws
hpx::exception – if locality does not represent a locality, or if target does not represent a valid target. The returned future becomes exceptional if the operation fails.
- Returns
A future that becomes ready once target’s state has been removed.
-
void hpx::supervision::remove_target(hpx::launch::sync_policy, hpx::id_type const &locality, hpx::id_type const &target, hpx::error_code &ec = hpx::throws)#
Clear all locally tracked state for a target on a possibly remote locality, blocking until the operation has completed.
This is the synchronous equivalent of remove_target(hpx::id_type const&, hpx::id_type const&).
- Parameters
locality – [in] The locality on which target’s state is tracked.
target – [in] The actor (or component) whose locally tracked state should be removed.
ec – [in,out] this represents the error status on exit, if this pre-initialized to hpx::throws the function will throw on error instead.
- Throws
hpx::exception – if locality does not represent a locality, or if target does not represent a valid target, unless ec was initialized not to hpx::throws.
-
void hpx::supervision::remove_target(hpx::id_type const &target, hpx::error_code &ec = hpx::throws)#
Clear all locally tracked state for a target on the local locality.
- Parameters
target – [in] The actor (or component) whose locally tracked state should be removed. Must be local to the calling locality.
ec – [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.
- Throws
hpx::exception – if target does not represent a valid target, unless ec was not pre-initialized to hpx::throws.