hpx::supervision::unregister_observer#

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::unregister_observer(hpx::id_type const &locality, hpx::id_type const &observer_handle)#

Unregister a previously registered observer on a possibly remote locality.

Note

Once the returned future has become ready, no orphaned callbacks fire after unregistration completes.

Parameters
  • locality – [in] The locality on which the observer was registered.

  • observer_handle – [in] The handle returned by a prior call to register_observer(). Only handles returned from that function are accepted; passing a handle obtained from register_activity_observer() (or any foreign handle) is rejected.

Throws

hpx::exception – if locality does not represent a locality, or if observer_handle does not represent a valid observer handle. The returned future becomes exceptional if the operation fails.

Returns

A future that becomes ready once the observer has been unregistered.

void hpx::supervision::unregister_observer(hpx::launch::sync_policy, hpx::id_type const &locality, hpx::id_type const &observer_handle, hpx::error_code &ec = hpx::throws)#

Unregister a previously registered observer on a possibly remote locality, blocking until the operation has completed.

This is the synchronous equivalent of unregister_observer(hpx::id_type const&, hpx::id_type const&).

Note

No orphaned callbacks fire after unregistration completes.

Parameters
  • locality – [in] The locality on which the observer was registered.

  • observer_handle – [in] The handle returned by a prior call to register_observer(). See the asynchronous overload regarding foreign handles.

  • 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 observer_handle does not represent a valid observer handle, unless ec was initialized not to hpx::throws.

void hpx::supervision::unregister_observer(hpx::id_type const &observer_handle, hpx::error_code &ec = hpx::throws)#

Unregister a previously registered observer on the local locality.

Note

No orphaned callbacks fire after unregistration completes.

Parameters
  • observer_handle – [in] The handle returned by a prior call to register_observer(). Must be local to the calling locality. See the remote overload regarding foreign handles.

  • 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 observer_handle does not represent a valid observer handle, unless ec was not pre-initialized to hpx::throws.