hpx::supervision::check_admission#

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:

dispatch_outcome hpx::supervision::check_admission(hpx::id_type const &target, std::uint64_t epoch = 0)#

Check whether target currently admits new dispatch under epoch.

Queries the local supervision manager’s terminal-latch state for target within epoch, i.e. the same state maintained by publish_event() and consulted by await_terminal(). Does not publish, mutate state, or notify observers.

Note

This is a pure local read of already-resident latch state, not a query that can fail the way a remote publish_event() call can; it never throws and carries no hpx::error_code out-parameter.

Note

The terminal latch consulted here is populated only by publish_event() calls delivered to this locality’s supervision manager for target. It is not synchronized across localities: a terminal event published to a different locality’s manager for the same logical target/epoch is invisible here and does not affect this call’s outcome. register_observer / unregister_observer notifications do not feed this state either. Any locality other than the one hosting target’s supervision manager that needs to gate its own dispatch decisions on target’s terminal state must build that cross-locality propagation itself (e.g. registering an observer with the owning locality and re-publishing locally, or routing the admission decision to the owning locality); this API provides no such mechanism.

Parameters
  • target – [in] The actor (or component) to check. Must be local to the calling locality.

  • epoch – [in] The epoch dispatch would occur under.

Returns

dispatch_outcome::rejected_fenced if target has already latched a terminal event (completed or failed) under epoch, dispatch_outcome::admitted otherwise (including when target is unknown locally or invalid).