diff --git a/annotations/yo/threading/examples/promise0.cc b/annotations/yo/threading/examples/promise0.cc index 551cc964..8768595d 100644 --- a/annotations/yo/threading/examples/promise0.cc +++ b/annotations/yo/threading/examples/promise0.cc @@ -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'; } //= diff --git a/annotations/yo/threading/examples/promise1.cc b/annotations/yo/threading/examples/promise1.cc index 3ff7e6d4..83e406ed 100644 --- a/annotations/yo/threading/examples/promise1.cc +++ b/annotations/yo/threading/examples/promise1.cc @@ -4,7 +4,7 @@ using namespace std; //code -void compute1(promise &ref) +void compute(promise &ref) { ref.set_value(9); }