std::future_status(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

okay so bestie, welcome to the std::future_status(3) page from the C++ Standard Library πŸ’– β€” and the name is std::future_status - std::future_status ✨ yes, that’s the whole NAME situation, and we’re rolling with it.

This is your little enum bestie for doing a vibe check on a future πŸ‘‘


✨ Synopsis ✨

Defined in header <future> 🫢

enum class future_status {

    ready,
    timeout,                (since C++11)
    deferred

};

It specifies the state of a future as returned by wait_for and wait_until functions of std::future and std::shared_future 🌈

πŸ“ Constants

  • deferred β€” the shared state contains a deferred function, so the result will be computed only when explicitly requested πŸ™ˆ
  • ready β€” the shared state is ready βœ…
  • timeout β€” the shared state did not become ready before specified timeout duration has passed ⏰

πŸ’… See also πŸ’…

  • wait_for β€” waits for the result, returns if it is not available for the specified timeout duration (public member function of std::future<T>) 🫢
  • wait_for β€” waits for the result, returns if it is not available for the specified timeout duration (public member function of std::shared_future<T>) πŸ’–
  • wait_until β€” waits for the result, returns if it is not available until specified time point has been reached (public member function of std::future<T>) ⏳
  • wait_until β€” waits for the result, returns if it is not available until specified time point has been reached (public member function of std::shared_future<T>) 🌸

xoxo, your Unix bestie πŸ’… β€” source: http://cppreference.com, version/date: 2024.06.10, page: std::future_status(3) βœ¨πŸ‘‘

πŸ“¦ where this page comes from