fixed a typo in section 20.12 (promise)

This commit is contained in:
Frank B. Brokken 2020-02-17 20:46:04 +01:00
parent 6c98835e3b
commit 47cd319370
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ void compute(int *ret)
int main()
{
int ret = 0;
std::thread(compute2, &ret).detach();
std::thread(compute, &ret).detach();
cout << ret << '\n';
}
//=

View file

@ -4,7 +4,7 @@
using namespace std;
//code
void compute1(promise<int> &ref)
void compute(promise<int> &ref)
{
ref.set_value(9);
}