In the following naive parallel merge sort example, std::async is used to launch multiple parallel merge_sort tasks. std::future is used to wait for the results and synchronize them:
#include <iostream>
using namespace std;
void merge(int low,int mid,int high, vector<int>&num)...