See Public API for a list of names and headers that are part of the public HPX API.
template<typename F, typename ...Ts>
bool post(F &&f, Ts&&... ts)#
Runs the function
fasynchronously (potentially in a separate thread which might be a part of a thread pool). This is done in a fire-and-forget manner, meaning there is no return value or way to synchronize with the function execution (it does not return an
hpx::futurethat would hold the result of that function call).
hpx::postis particularly useful when synchronization mechanisms as heavyweight as futures are not desired, and instead, more lightweight mechanisms like latches or atomic variables are preferred. Essentially, the post function enables the launch of a new thread without the overhead of creating a future.
hpx::postis similar to
hpx::asyncbut does not return a future. This is why there is no way of finding out the result/failure of the execution of this function.
- template<typename F, typename ...Ts>