title: What is std::promise?
body: <p>I'm fairly familiar with C++11's <code>std::thread</code>, <code>std::async</code> and <code>std::future</code> components (e.g. see <a href="https://stackoverflow.com/a/10998831/596781">this answer</a>), which are straight-forward.</p>
  <p>However, I cannot quite grasp what <code>std::promise</code> is, what it does and in which situations it is best used. The standard document itself doesn't contain a whole lot of information beyond its class synopsis, and neither does <a href="http://www.stdthread.co.uk/doc/headers/future/promise.html" rel="noreferrer">std::thread</a>.</p>
  <p>Could someone please give a brief, succinct example of a situation where an <code>std::promise</code> is needed and where it is the most idiomatic solution?</p>