C++ Async operation classes


Example

  • std::async: performs an asynchronous operation.
  • std::future: provides access to the result of an asynchronous operation.
  • std::promise: packages the result of an asynchronous operation.
  • std::packaged_task: bundles a function and the associated promise for its return type.