Std::promise
`std::promise` is a component of the C++ Standard Library that allows a thread to set a value or an exception that can be retrieved by another thread. It acts as a bridge between threads, enabling asynchronous programming by providing a way to communicate results from one thread to another.
To use `std::promise`, you typically create an instance and associate it with a `std::future`. The `std::future` can then be used to obtain the value or exception once it is ready. This mechanism helps manage concurrency and ensures that threads can synchronize their operations effectively.